[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dd|tar backup over ssh fails, could someone give me a pointer.

Le Ven 12 septembre 2008 14:04, Adrian Levi a écrit :
> I am trying to do a complete backup of a drive in a brand new laptop
> to eventually wipe and install linux.

You dont have to use a temporary file. You can try the following :
- NewLaptop : create partitions (ie hda1 for /boot and hda2 for /)
- NewLaptop : create the filesystems on the partitions (mke2fs /dev/hda1 ;
mke2fs /dev/hda3 )
- NewLaptop : mount the filesystems on /mnt as they will be (mount
/dev/hda2 /mnt; mkdir /mnt/boot ; mount /dev/hda1/ /mnt/boot)
- NewLaptop : run the following command to copy all the files
ssh root@OldPc "tar cjf - --exclude lost+found --exclude /proc --exclude
/sys /" | (cd /mnt ; tar xvjf - ; mkdir proc sys)
- NewLaptop : chroot in /mnt (chroot /mnt)
- NewLaptop : mount /proc
- NewLaptop : install GRUB or LILO on the MBR (grub-install /dev/hda;
- NewLaptop : umount /proc
- NewLaptop : umount the filesystems (umount /mnt/boot; umount /mnt)
- NewLaptop : reboot

It SHOULD work

PS: The transfert might be twice compressed : one time with the tar's "j"
option and a second time by ssh

http://www.cerbelle.net - http://www.afdm-idf.org

Reply to: