[mythtv-users] Advice on Partitions

Mike Holden mythtv at mikeholden.org
Wed Mar 4 11:05:44 UTC 2009

Jonno wrote:
> Would this be an appropriate order to do things:
> Exit mythtv and stop the backend
> cp -r /var/lib /temp/var/lib
> umount sda6
> cp -r temp/var/lib /var/lib
> Remove the line from /etc/fstab that mounts sda6 on /var/lib
> Reboot into Gparted LiveCD
> Delete sda6 partition
> Resize sda1 partition
> Reboot
> rm -rf /temp/var/lib

cp -r is definitely NOT adequate to back up your current partition. For
starters, it won't restore proper ownership and permissions on the files,
so everything will be hosed when you restore, but possibly in a subtle way
that will not be obvious straight away.

What I normally do for this kind of thing is to use tar to create a backup
file and restore from that later. Check out the options for restore to
make sure you get everything back correctly, especially ownership and

Alternatively, if you are able to create the new area before dropping the
old one, use rsync to create a full copy of everything, unmount both areas
then remont them in the opposite locations, thus swapping old with new.
Mike Holden

http://www.by-ang.com - the place to shop for all manner of hand crafted
items, including Jewellery, Greetings Cards and Gifts

More information about the mythtv-users mailing list