Easy backups with Obnam

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Emergency Exit

Obnam provides two ways to restore lost data. The first takes advantage of the properties of the FUSE filesystem [11], which is standard on most current Linux systems. The second way is for when FUSE isn't around and is not as easy.

Each directory shows a backup generation (clearly indicated by number). You can thus look at the backup that you want to recover fully or partially. Change to the appropriate directory and check its contents. To restore the latest backup or parts of it, use the latest parameter instead of a number.

To restore a single file, first mount a directory anywhere, then use the copy command to copy the file to it. You can then use the diff tool [12] to compare the file content. After a successful restore, simply unmount the directory again (Listing 4, line 7).

Listing 4

Restoring Data with FUSE

01 $ mkdir ~/backups
02 $ obnam mount --to ~/backups
03 $ ls -l ~/backups
04 drwxr-xr-x 25 root root 4096 Apr 27 19:59 5543
05 drwxr-xr-x 25 root root 4096 May  1 09:43 6751
06 lrwxr-xr-x 25 root root 4096 May  1 09:43 latest -> 6751
07 $ fusermount -u ~/backups

If FUSE or the obnam mount command is not at hand, search for what you want to restore with the generations parameters and ls . You use the command on the first line of Listing 5 to extract the file in question from the repository. You can restore the complete last generation with the command on line 2, and an older backup by specifying its number (line 3).

Listing 5

Obnam Restore

01 $ obnam restore --repository repository/path --to path
02 $ obnam restore --to path
03 $ obnam restore --to path --5543

FUSE is a userspace filesystem. If it's used, Obnam shows the backups as normal directories that you mount by using the first line in Listing 4 to make a new home subdirectory. Then, you mount the directory for the backups in line 2 and list its contents in line 3.

You can make automated backups with a cron job that specifies time intervals. Get the gnome-schedule package for Gnome for a graphical interface. The same goes for KDE with a similar tool under System settings | Task scheduler . The console has an editor that you can call up with crontab -e .

It's advisable to start off with a small backup and test a complete or partial restore. This process should assure some confidence when it comes to restoring real lost data, which you may have lost because of a bad hard drive or an accidentally deleted directory. You can count on one or the other occurring at some point.

Conclusion

Obnam lets you easily create space-saving backups locally or remotely and restores reliably in an emergency. The program doesn't provide a graphical interface but is still simple to operate. Besides, what's the use of the nicest graphical interface if you can't get to it after a system crash?

Obnam is client-based, which allows for flexibility that will meet the requirements of small and even medium-sized companies. How elaborate these backups need to be depends on each case. Obnam doesn't impose any limits and can safeguard the data of several customers in a repository while taking deduplication into account. l

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content