Backup System

Perhaps this should be in the Install forum?

I’m about to replace a hard drive that has a perfectly working 11.4 KDE install. Need more space.

A fresh install takes me about 7 hours because of my slow internet connection.

If I do the following will I duplicate my install on the new hard drive? Assuming I boot from LiveCD or USB stick to extract my archive and mkdir.

Will I run into a problem with fstab in that the new hard drive will be larger? I think not.

/home will be backed up separately.

/home2 is my second hard drive.

Backup

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media –exclude=/dev --exclude=/tmp --exclude=/home --exclude=/home2 /

Restore

tar -xvpzf /home/test/backup.tar.gz -C /

Re-create excluded directories

mkdir /proc /lost+found /sys /mnt /media /tmp /home /home2

boot new system

Hi,
Personnally, I’d use dd and then later resize the partition on the new drive.

Before I’d do that, I’d make sure that the fstab and /boot/grub/menu.lst point to dev/sda1 etc, instead of dev/disk/by-id etc…

That way you can be sure that the new disk will boot ok.

HTH

Lenwolf

On 2011-05-05 05:06, Ski K2 wrote:
>
> Perhaps this should be in the Install forum?
>
> I’m about to replace a hard drive that has a perfectly working 11.4 KDE
> install. Need more space.

/usr/share/doc/howto/en/txt/Hard-Disk-Upgrade.gz

http://tldp.org/HOWTO/Hard-Disk-Upgrade/


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

lenwolf

Thanks but I want to exclude home and I thought dd made an exact replication. I’ll look at man dd for exclusion.

Carlos

Your how to link looks promising.

From what I have learned today.
Those names should no longer be used because of the way the linux kernel scans
disks nowadays. They can theoretically change between boots and
certainly on apparently identical systems that have a minor difference.

Good luck,
Hiatt

On 2011-05-05 16:36, Ski K2 wrote:
> Carlos
>
> Your how to link looks promising.

It has some years, but the ideas and methods are still valid. Only details,
like fstab devices, change.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

True, however, if you dd a disk and then swap that in for the first one, you’ll most probably not have that problem. Later on, you can re-substitute the long names again (which WILL have changed).

HTH

Lenwolf