http://forums.gentoo.org/viewtopic.php?t=28123&highlight=backup
I wrote a bash script which will clone your gentoo partition on another partition, so you are safe to do anything advetureous…
Why is the script? Isn't "cp -a / /mnt/clone" would be enough? Unfortunately, this would require to unmount separate partitions, like /home, and could cause problems with /dev partition which gentoo uses. Certain special files would also be left out. So, after a reading a long discussion on gentoo user list, I chosen the possibly safest solution (at least what I tried) and wrote a scrip around it to make it easy to use.
the whole script could be done in two actual lines in it.
find -mount -print | cpio -pdm $CLONE_DIR
99% of it is checking the parameters, printing out docs making it as automatic as possible.
lakicsv Dec 31, 2002
An alternative way to do backup your partition into a compressed file is this:
tar -X tar.exclude -cvjpf backup.tar.bz2 /*
With this being an example tar.exclude file:
/mnt /tmp /usr/src /usr/portage/distfiles /var/tmp /proc
Be sure to put the path for the backup tar.bz2 archive somewhere on a different partition then your / partition.
Freak_NL Jan 23, 2003
much much simpler way would be.
mount drive to wich would hold the backup
mount /dev/hdc3 /backup
then copy files over
rsync -va --deleate --exclude=/proc/* --exclude=/dev/* --exclude=/backuo/* / /baclup
then have some code to change the fstab, and add the entry in to your grub config. all done.
then later you can add the -u option to rsync and just update what has changed.
kappax Feb 02, 2003