gentoo 备份和恢复

http://www.linuxcoffee.org/?p=59

http://blinkeye.ch/mediawiki/index.php/GNU/Linux_System_Backup_Script_(stage4)

备份stage4的脚本

# wget ftp://blinkeye.ch/gentoo/mkstage4.sh
# chmod +x mkstage4.sh
# ./mkstage4.sh

恢复脚本:
boot off a live-cd and repartition your harddisks and create filesystems as necessary (make sure you remove all remaining files of your to-be-intallation).
eventually reboot, using option: gentoo docache
# umount /mnt/cdrom
remove the live-cd and insert the cd with the stage4
# mount /dev/cdrom /mnt/cdrom
# mount /dev/hdaX /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hdaX /mnt/gentoo/boot
# tar xzvpf /mnt/cdrom/host-stage4-18.04.2005-custom.tar.gz -C /mnt/gentoo/
or
# tar xjvpf /mnt/cdrom/host-stage4-18.04.2005-custom.tar.bz2 -C /mnt/gentoo/
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
if in need adjust necessary files (/etc/fstab, /boot/grub/grub.conf) and/or install grub
# emerge sync (rebuild portage tree)
# exit
# cd /
# umount /mnt/cdrom
# remove backup cd
# umount /mnt/gentoo/boot
# umount /mnt/gentoo/dev
# umount /mnt/gentoo/proc
# umount /mnt/gentoo
# reboot

其他信息可以参考http://blinkeye.ch