[mythtvnz] Installed new storage drive - lost previous recordings
Ross Williamson
ross at inertia.net.nz
Thu Feb 2 02:54:39 GMT 2012
> 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
More information about the mythtvnz
mailing list