Creating Snapshot-Backups with FlyBack On Ubuntu 7.10

In: Ubuntu or Linux

28 Feb 2008

FlyBack is a tool similar to Apple’s TimeMachine. It is intended to create snapshot-backups of selected directories or even your full hard drive. From the FlyBack project page: “FlyBack is a snapshot-based backup tool based on rsync. It creates successive backup directories mirroring the files you wish to backup, but hard-links unchanged files to the previous backup. This prevents wasting disk space while providing you with full access to all your files without any sort of recovery program. If your machine crashes, just move your external drive to your new machine and copy the latest backup using whatever file browser you normally use.” This article shows how to install and use FlyBack on Ubuntu 7.10 (Gutsy Gibbon).

1 Installing FlyBack

In order to install FlyBack, we open a terminal (Applications > Accessories > Terminal):

110.jpg

First we install FlyBack’s dependencies as follows:

sudo apt-get install python python-glade2 python-gnome2 python-sqlite python-gconf rsync

21.jpg

Then we download and unpack FlyBack (in our home directory) like this:

cd ~wget http://flyback.googlecode.com/files/flyback_0.4.0.tar.gztar -zxvf flyback_0.4.0.tar.gz

That’s it already, FlyBack can now be used.

2 Using FlyBack

It’s a good idea to store your backups on an external hard drive. Please plug in an external hard drive and wait until it gets mounted (an icon should then appear on your desktop):

31.jpg

Now, in a terminal, type in the following command to start FlyBack:

cd ~/flyback/python flyback.py

FlyBack starts. If you see the following error message, simply click on OK – you can ignore this error:

41.jpg

FlyBack starts with the Preferences window. On the Storage Location tab, select your external hard drive:

51.jpg

Then go to the Included/Excluded Directories tab. Here you must specify which directories you want to back up and which ones you want to exclude from the backups:

61.jpg

Select the directories you want to back up (e.g. your home directory)…

71.jpg

… and click on the Add button:

81.jpg

The selected directory should now be listed under included dirs. Repeat this step for as many directories as you want to back up. The exclude patterns field already contains a good default selection of files/directories not to back up. Modify it only if you know what you’re doing:

91.jpg

On the Backup Schedule tab you can automate FlyBack backups if you like:

101.jpg

Please note that FlyBack doesn’t have to be running if you’ve selected to create automatic backups on the Backup Schedule tab. FlyBack creates a cron job for it. You can check that by opening a terminal and running:

crontab -lIn the output there should be a cron job for FlyBack (e.g. like this, running at the selected time):
falko@falko-desktop:~$ crontab -l0 3 * * * python /home/falko/flyback/flyback.py --backup #flybackfalko@falko-desktop:~$

Now that we’ve configured FlyBack to our likings, we can close the Preferences window.

The main window looks as follows, showing you the contents of your hard drive. The right window (system snapshots) lists all available backups – as we’ve created none yet, it only shows now which refers to the actual content of your hard drive.

112.jpg

You can browse the contents of your hard drive like you know it from your default file browser. The Home button takes you to your home directory (e.g. /home/falko):

122.jpg

2.1 Creating A Backup

To create your first backup, click on the Backup button. Please note that this will back up only the directories that you’ve selected on the Included/Excluded Directories tab in the Preferences window, regardless of what directory you’re currently in.

132.jpg

While the backup is being created, the Backup button is greyed out (saying Backup is running):

142.jpg

Afterwards, the system snapshots window lists your new backup. If you click on it, you see the contents of the backup, not your hard drive:

152.jpg

If you browse the contents of the backup, you’ll notice that it really only includes the directories and files that you’ve specified on the Included/Excluded Directories tab and nothing else:

161.jpg172.jpg181.jpg

2.2 Restoring A Backup

Now let’s delete some files or directories from our hard drive (of course, these files/directories must be in the directory that you’ve backed up!) and see if we can restore them from our backup. I’ve backed up my home directory, so I go to Places > Home Folder

191.jpg

… and delete some diretories in it:

201.jpg211.jpg

Now in FlyBack, if you go to the snapshot called now (which is the current content of your hard drive), you’ll see that the deleted directories are missing there as well:

22.jpg

Now go to the snapshot you’ve just created, and you’ll find the deleted directories in there. Mark them (hold down the CTRL key and click on the directories if you want to mark multiple directories at a time) and click on the Restore button:

23.jpg

Afterwards go to the now snapshot, and you should find the directories on your hard drive again:

24.jpg

2.3 Deleting Backups

Backups can simply be deleted using a file browser. On the external hard drive you should find a folder called flyback:

25.jpg

In the flyback folder, you will find all your snapshots:

26.jpg

To delete a snapshot, right-click on it and select Move To Trash:

27.jpg

In FlyBack, you’ll still see the backup in the system snapshots window. Click on the Refresh button…

28.jpg

… and the backup is gone:

29.jpg

3 Creating A Menu Entry For FlyBack

If you don’t want to start FlyBack form the terminal each time, you can create a menu entry for it. Right-click on Applications and select Edit Menus:

34.jpg

Select System Tools and click on the New Item button:

35.jpg

A Launcher Properties window opens. In the Name field, type in FlyBack, and in the Command field specify something like this:

python /home/falko/flyback/flyback.py

Please replace /home/falko with your own path! Then click on Close:

36.jpg

Click on Close again to leave the menu settings:

37.jpg

Now you can start FlyBack under Applications > System Tools >FlyBack:

38.jpg39.jpg

Comment Form

About this blog

This is a place I create just for fun and to write down some experience and notes for myself. So feel free to enjoy and drop any comments you have. I had been employed as Programmer, System Analysts, System Administrator, DBA and Project Manager. I will share some of my case study here as well. Enjoy!

 

Calendar

September 2010
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
27282930