Ottawa PC Users' Group (OPCUG)


   Copyright and Usage

   Privacy Policy

   Contact Us


Exploring Linux - Part 21

by Alan German

Although I use Linux most of the time, when it comes to full-system backups, I have resorted to dual-booting into Windows and using the free edition of Macrium Reflect ( MacriumReflectFree.htm). Under Linux, I have so far restricted my backups to either file and folder synchronization using FreeFileSync (, or real-time backup of my data partition using inosync ( Now, it's time to move on and find a more comprehensive Linux solution for file, folder, and disk partition backups.

One program that I have tried in the distant past is partimage ( A brief return to this software reminded me that it sports a quasi-graphical interface (much like old DOS programs), needs to be run as root, and requires partitions to be unmounted for processing. The simplest way around all of these issues is to run the program using a bash script file.

My solution was to incorporate commands to unmount my data partition (sudo umount /dev/sda2), run partimage, and then remount the data drive (sudo mount /media/DataDisk/) to make this once again available for use. The command to run partimage to make the backup on my external USB drive (/media/MYBOOK1) takes the form:

sudo partimage -z1 -o -d -b -B=alan save /dev/sda2/media/MYBOOK1/z_images/test0/datadisk_ddmmm12.gz

The switches used for partimage are mostly straightforward: -z1=use Gzip compression, -o=overwrite any existing image file, -d=no description, and -b=run in batch mode (GUI doesn't wait for input). The -B switch is a little strange. There has to be a -B=value, but partimage doesn't seem to care what “value” is used. I opted to use -B=alan which worked just fine.

The other potential problems with partimage are that it has no support for the ext4 file system and there is no 64-bit version of the software. A possible workaround for both these issues is a relatively new program named fsarchiver ( for file system archiver. However, a possible downside to fsarchiver is that, while it also supports NTFS, it has no support for FAT disk volumes.

This program is a bit similar to partimage (although it currently only sports a command line and no GUI) and at least one web posting suggests that the two pieces of software may come from the same programmer. Fsarchiver uses a slightly different command line format than partimage. It's still best to work with unmounted volumes, but I was easily able to get my bash script file to work by modifying the main command to:

sudo fsarchiver -o -v savefs /media/MYBOOK1/z_images/test4/datadisk_ddmmmyy.fsa /dev/sda2

The -o switch is to overwrite any existing backup file, while the -v switch provides verbose output and displays the progress for individual files while the backup process is running.

Fsarchiver provides support for multiple file system backups in a single file system archive (.fsa) file. While perhaps an interesting idea for some, for me this has the disadvantage that it is even more difficult to retrieve individual files or folders from the backup. So, onto yet another possible backup solution...

The current release of Ubuntu Linux (Oneiric Ocelot) has the Déjà Dup ( backup utility built into the distro. If you are a fan of minimal graphical user interfaces, then you have arrived at the right place! Launching Déjà Dup produces a small window with two large buttons – Backup and Restore – so, it's not too difficult to figure out how the program works.



Setting the program's preferences to indicate the backup location, and the files and folders to be included in the backup process, is a straightforward process. The dialogue box has a number of other options, such as the ability to add a list of exceptions for files or folders that are not to be included in the backup, file encryption, backup on a regular schedule (e.g. daily), and setting the time period for which backups should be retained (which includes “Forever”).

Déjà Dup is actually a graphical front end to a program named duplicity, and it's the latter utility that creates the backup, essentially as a series of Gzip files. Initially, duplicity makes a complete backup of the source files. Subsequent backups are made as a series of incremental backups such that only the changes in the source files are copied to the target directory.

The backup series is stored chronologically in a bewildering series of volumes, manifests, and signature files in the target directory. Fortunately, these are effectively transparent to the user. Pressing the Restore button returns a “Restore from When?” dialogue box, with the individual backups in the series being displayed in a simple list.

Running the program to create or restore an entire backup is as simple as pressing a button. The only real downside is that recovering a single file from the backup set is not a straightforward exercise. There is no option for this built into the program, and finding a given file among the many Gzip files is probably more trouble than it's worth.

Several backup packages available for Linux are based on the rsync file synchronization utility. This program creates backups by simply copying files, which makes restoring a single file or folder very easy. Some time ago, I played around with rsync ( linux_part9.htm), but found the use of the command line tedious. While one can use a bash script file to make the backup process more efficient, it's even simpler to use a purpose-built backup program that essentially adds a graphical front end to the package. Next time, we will review some packages that use this technique.

Bottom Line:



Déjà Dup

Originally published: March, 2012

top of page



Archived Reviews





The opinions expressed in these reviews
do not necessarily represent the views of the
Ottawa PC Users' Group or its members.