[mythtvnz] Installed new storage drive - lost previous recordings
Paulgir
paulgir at gmail.com
Thu Feb 2 05:01:00 GMT 2012
On Thu, 02 Feb 2012 15:54:39 +1300, Ross Williamson <ross at inertia.net.nz>
wrote:
>> I guess it would be advisable to keep the new drive for recordings etc.
>> and the smaller drive for the OS .
>> What is the best way to move those existing recordings off the
>> smaller drive?
>
> What you'll want to do is:
>
> 1) Create a temporary mount point
>
> sudo mkdir /mnt/tmp
>
> 2) Mount the new drive there. Going by your first email, I'm going to
> assume this is /dev/sdb1
>
> sudo mount /dev/sdb1 /mnt/tmp
>
> 3) You now need to move the files from /var/lib/mythtv to /mnt/tmp -
> there are a number of ways to do this. Do you already have the MythTV
> folder structure on the new drive? You can check by running:
>
> find /mnt/tmp
>
> And checking the results. If it just prints:
>
> /mnt/tmp
>
> Then you can do a simple mv:
>
> sudo mv /var/lib/mythtv/* /mnt/tmp/
>
> On the other hand, if it prints:
>
> /mnt/tmp
> /mnt/tmp/recordings
> /mnt/tmp/video
> [...etc etc...]
>
> You'll effectively need to merge the old and new structures. You could
> do a cp followed by an rm, or an rsync command similar to this one:
>
> sudo rsync -av /var/lib/mythtv /mnt/tmp --remove-sent-files
> --ignore-existing
>
> (explanation: this does a one-way sync from /var/lib/mythtv to /mnt/tmp,
> removing the files as it goes)
>
> 4) After you are satisfied your recordings are now in /mnt/tmp (run the
> find command above again to check), you need to unmount the new drive
> from the temporary mount:
>
> sudo umount /mnt/tmp
>
> 5) And finally, run your original mount command again:
>
> sudo mount /dev/sdb1 /var/lib/mythtv
>
> Hopefully, you now have everything there. Disclaimer: I've done this
> entirely from my head so I may have missed a detail or two.
>
> Good luck
>
> Ross
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
That worked.
I will probably shrink the size of the 160GB partition the OS is on and
create another partition to use some other storage.
Thanks Ross and Nick for the help.
More information about the mythtvnz
mailing list