remote dump and restore

ref
http://www.freebsd.org/doc/ja_JP.eucJP/books/handbook/backup-basics.html
http://hirotyanteikoku.cocolog-nifty.com/cocolog/2009/02/ubuntu-5d6b.html

dump

$ sudo -s
# dump -0uan -f - / | gzip -2 | ssh -c blowfish myname@xxx.xxx.xxx.xxx dd of=/home/myname/root.dump.gz
# dump -0uan -f - /boot | gzip -2 | ssh -c blowfish myname@xxx.xxx.xxx.xxx dd of=/home/myname/boot.dump.gz

restore

  1. install newsystem
  2. make centos5 liveCD (centos5 can mount LVM)
  3. boot from the liveCD
  4. login as root
  5. setup netwrok
  6. yum install dump
  7. mkdir /mnt/root
  8. mount root of newsystem to /mnt/root (# mount /dev/systemname/root /mnt/root)
  9. cd /mnt/root
  10. rm -Rf bin sbin usr etc ...
  11. zcat root.dump.gz | restore -rf -
  12. gedit /mnt/root/etc/fstab
  13. edit line "/" "/boot" and "swap"