Tag/tag.png

Candidate for Deletion
This article may not be appropriate for this wiki, and may be deleted. More info...

Introduction

Backing up your system allows you to make sure that if anything happens to your system drive, you have another copy of those files in a safe place. Generally an automated solution is the best solution because it doesn't require you to actually do anything after it is setup. There are a ton of different backup solutions and hopefully you will find one that suits you below.

IconsPage/tip.png

It is important to have both a backup "on-site" and one "off-site".

Where to Backup to

CD/DVD

Pros Smile :)

Cons Sad :(

Cheap

Too small

Easy to bring "off-site"

Annoying to swap out discs constantly

Hard if not impossible to have completely automated solution

Easily scratched/destroyed

In general I don't recommend using discs to backup your entire system. They are good if you are backing up small things and want to store them some place else, but other than that they are not very useful.

Hard Drive

Pros Smile :)

Cons Sad :(

Huge

More expensive than discs

Always available so good for automatic backup

Can be external or internal

Fast

Hard Drives are incredibly cheap these days and allow you to backup your entire system very easy and automatically. Also they can be internal or external to your computer.

Internet

Pros Smile :)

Cons Sad :(

"Off-site"

Slow

No need to manage

can get expensive

Cheap initially

All your data is with someone else

The Internet is a great place to backup your system for "off-site" backup. There are many great services out there such as Ubuntu One, Carbonite and Amazon S3.

Backup Software

IconsPage/tip.png

For these tutorials /backup will be the backup directory and /home will be the directory you are backing up.

Command Line Based

There are many command line based backup solutions. You can schedule these using a tool such as cron.

Copy

The most straight foward way is to simply copy using the 'cp' command. To use it type:

cp -a /home /backup

Lets go over this command:

  • -a - this goes recursively into directories and preserves file permissions and other file characteristics.

  • /home - the directory you are copying from

  • /backup - the directory you are copying to

Because cp does not have --exclude options it is not recommended to use this method to backup something such as your entire root(/) directory because that will copy a bunch of unneeded stuff such as /proc, /tmp, /lost+found, etc. Also because of the lack of folder exclusion you want to make sure that the location you are copying to is not inside the folder you are copying from.

IconsPage/tip.png

cp will copy everything every single time, so even if nothing has changed it will still copy everything. You will probably want an incremental backup solution for anything large

To restore your backup just do the same command but switch the directories, so in our example you would do.

cp -a /backup /home

This will copy everything in /backup to /home.

Tar

Tar is an archiving tool that can provide straight backups as well as incremental backups. The best part of TAR is that it can compress your backups. To use Tar type:

tar -cvzf /backup/backup.tgz /home

Lets go over this command:

  • c - create a new backup archive

  • v - verbose, tar prints what it does

  • z - compress the archive the with gzip compression

  • f <filename> - Specifies where to place the backup archive, /backup/backup.tgz is the filename in this example

To restore your backup run

IconsPage/warning.png

This will overwrite files in the directory you are restoring into, be careful

tar -xvpzf /backup/backup.tgz -C /home

This will uncompress and copy the backup in /backup/backup.tgz to /home.

For more information on TAR as well as how to do incremental backup check here: Backup/Tar

Rsync

Rsync is another backup utility that works by copying just the differences between files. This makes it very quick to backup and makes it one of the favorites of command line backup tools. To use it just type:

IconsPage/warning.png

This will delete items in /backup that are not in /home, be careful.

rsync -av --delete /home/ /backup

Lets go over this command:

  • -a - Archive option, this copys recursively as well as maintains symlinks and permissions

  • -v - Verbose, makes rsync list what it is doing

  • --delete - delete files on /backup that aren't on /home

Rsync is wonderful for backup because of it's incremental abilities as well as the fact that rsync works very well with ssh.

To restore just switch the source and the destination, so for our example it would be:

rsync -av /home/ /backup

For more information, including setting up rsync daemons and rsync ssh support check out this page: Backup/rsync

Rdiff-backup

rdiff-backup is a python based script that allows the user to backup their system. It is different than the other tools we have covered here because it does incremental backup as well as versioning. This means that everytime you backup it keeps the changes from backup to backup which allows you to go back in time for what has happened to your files. Just like the other tools, this is very easy to use.

First rdiff-backup needs to be installed so install: rdiff-backup. Then just type this command

rdiff-backup /home /backup

That's it! Restoring is just as easy to do as well. To restore just add the -r flag, so for our example do

rdiff-backup -r /backup /home

Rdiff-backup has many more features, and you can learn about them here: /Backup/rdiff-backup.

Duplicity

Duplicity builds apon rdiff-backup to allow for incremental backup, but adds built-in encryption abilities. Duplicity, like all the tools here is very easy to use. To get started you need to install: duplicity Then to do a basic backup just run

duplicity /home /backup

this will backup /home to /backup. The best part is restoring is just as easy to do, simply just switch the directories, so for our example you would type.

duplicity /backup /home

For more information including how to setup ftp and encryption check out the wiki page at /Backup/duplicity.

Graphical User Interface(GUI) Based

These are generally easier for beginners, and many times use the terminal based backends that are listed above.

Simple Backup Suite

Simple Backup Suite(sbackup) is simple GUI backup program that is inteded for desktop usage. It supports many different features and is incredibly easy to use.

3.png

To use sbackup first you need to install it, which is very easy just install: sbackup. Once you install sbackup you can access it by going to System > Administration > Simple Backup. Once the program is started it is very easy to figure out. For more information on how to use Sbackup check out the wiki page at /Backup/sbackup.

PyBackPack

PyBackPack is a Graphical front end to rdiff-backup. It allows the user to take advantage of all the features of rdiff-backup in an easy to use format.

pybackpack.gif

To use PyBackPack you first need to install it, so go and install: pybackpack. After you have install pybackpack you can start using it in the System > Administration > File Backup Manager menu option. The software is pretty straight foward to use, but if you need more information check out the wiki page at /Backup/pybackpack.

Déjà Dup

Déjà Dup is a Graphical front end for Duplicity. It is incredibly easy to use and integrates with ubuntu very well.

deja.gif

Just like the rest of these packages, to use it you first need to install: deja-dup. After the packages is installed you can open it by going to to Applications > Accessories > Deja Dup Backup Manager. To get more information head over the the wiki page at /Backup/Deja-dup.

Conduit

Conduit is a syncronization program built for the Gnome desktop. Conduit comes with one of the easiest and intuitive interfaces of any of these progams. Also, Conduit allows for users to sync from/to many different sources including youTube, DropBox and many other services and desktop software.

Conduit is in the ubuntu repositories and can be had by installing: conduit. Once installed, you can run the program in the menu under Applications > Accessories > Conduit Synchronizer. This tool works a little bit differently then the rest of the tools here, but if you need help figuring out the tool checkout the wiki page at /Backup/Conduit.

BackInTime

filler


CategoryBackupRecovery

jmburgess/Backup (last edited 2013-12-13 23:22:06 by knome)