Backing up your system is an important thing for everyone to do. You never know when your hard drive will die, or some other disaster strikes. You don't want to lose all of your bookmarks, pictures from vacations, documents, school papers, music, and more just because you did not make a recent backup. It can be as simple as backing up the most important things on your computer to a CD or DVD, or using one of the methods here for backing up your entire /home directory, or maybe your whole computer. There are several methods listed here for you to choose from.
Using the TAR command
This requires using the command line (aka the terminal) It makes a backup of your root or whatever directory you want to backup into a nice TAR file. You can backup to remote directories, different hard drives, to a CD or DVD (if the finished tar file is over 2gb, you will have to use the "split" command and use multiple cd's or dvd's.
To get a nice tutorial on how to backup using the TAR command, visit this page: BackupYourSystem/TAR
Using Simple Backup Suite (easiest, GUI)
Simple Backup Suite is a program that was created during the Google Summer of Code 2005. It is program with a GNOME interface (if you use KDE or some other work manager, you might need to install some stuff in order to run Simple Backup Suite). You can specify how often it backs up (or not automatically at all), the destination (including remote locations), what file types / directories to exclude and what directories you want it to back up. Simple Backup Suite also makes incremental backups, so once you do a full backup, all backups after that are simply what has changed between the last full backup and your increment. You can also configure the rules that old backups get deleted.
To view on how to set up, configure and backup using Simple Backup Suite, please visit this page here: BackupYourSystem/SimpleBackupSuite
GRUB restore
Now, if you want to move your system to a new harddisk or if you did something nasty to your GRUB (like, say, install Windows), You'll also need to reinstall GRUB. There are several very good howto's on how to do that here on this forum, so i'm not going to reinvent the wheel. Instead, take a look [http://www.ubuntuforums.org/showthread.php?t=24113&highlight=grub+restore here] (forum) or here: RecoveringUbuntuAfterInstallingWindows
On the forum thread, there are a couple of methods proposed. I personally recommend the second one, posted by remmelt, since that has always worked for me.
Other Methods
dd
The command:
dd -if /dev/hda1 > partitionimage.dd
will backup a partition. A whole drive could be backed up using just /dev/hda as the input "file". Restoring is done by:
dd -if partitionimage.dd -of /dev/hda1
You can also pipe through gzip or bzip2 to compress the images.
rsync
Rsync updates the copies the files that have changed and even then only transfers the parts of those files that have changed. That is useful for saving bandwidth when backing up over the network. For safety, transfer between two machines is done via SSH. Rsync is especially good for backing up home directories.
The command for transfering to a remote machine is:
sudo rsync --delete -azvv -e ssh /home remoteuser@remotehost.remotedomain:./backupdirectory
-z compresses the data --delete deletes files that don't exist on the system being backed up. Maybe you want this, maybe not. -a preserves the date and times of the files (same as -t), descends recursively into all directories (same as -r), copies symlinks as symlinks (same as -l), preserves file permissions (same as -p), preserves groups (same as -g), preserves file ownership (same as -o), and preserves devices as devices (same as -D). -vv increases the verbosity of the reporting process
other options
You might also want to check out these backup programs which will help you to make automated backups of your system:
[http://amanda.zmanda.com/ Amanda]
[http://www.partimage.org/ Partimage]
[http://www.mondorescue.org/ Mondo Rescue]
[http://www.rsnapshot.org/ rsnapshot]
CategoryDocumentation CategoryCleanup
See the full discussion in this thread on the Ubuntu forums. http://www.ubuntuforums.org/showthread.php?t=70566