Backup Complete Hard Drive
Frank
mailinglists at lavabit.com
Thu Dec 10 21:50:59 UTC 2009
On Thu, 2009-12-10 at 12:28 +0800, kate wrote:
> What I mean is do a complete system back up onto a external hard drive,
> erase or format the original and place back all directories and files as
> it was originally.
My backup solution consists of two separate backups: one for the system
(everything except home folder) and a second of home folder only.
For mirroring the Home folder:
sudo rsync -av --delete
--exclude=.gvfs /home/<my_User_Name>/ /media/<destination
disk>/home/<my_User_Name>
For mirroring the file system, except Home folder:
sudo rsync -va --partial --delete --exclude=/media --exclude=/lost+found
--exclude=/dev --exclude=/mnt --exclude=/proc --exclude=/sys
--exclude=/tmp --exclude=/home/* / /media/<destination disk>/
I run the Home folder backup script almost every day (yes, sounds
paranoiac, but I really do not want to loose any file in case of a hard
disk crash or whatever).
I do a system backup few days after major changes on my configuration or
big updates, just to be sure that everything work correctly.
For a complete restore, run Ubuntu from a Live-CD and:
- sudo rsync -av /media/<source> /media/<destination>
create the previously excluded directories (mkdir) sys, dev, proc,
tmp...
- sudo chamod a+w /tmp
- update /etc/fstab and /boot/grub/menu.lst with the correct UUID
More information about the ubuntu-users
mailing list