Easy backups with Obnam
|
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
Infos
- Backup programs: http://en.wikipedia.org/wiki/List_of_backup_software
- Obnam tutorial: http://liw.fi/obnam/tutorial/
- Obnam manpage: http://liw.fi/obnam/obnam.1.txt
- "Staying in Sync" by Heike Jurzik, Linux Magazine , Issue 67, 2006: http://www.linux-magazine.com/Issues/2006/67/Shredder_9_Chess_Too
- Obnam release notes: http://liw.fi/obnam/1.0/
- Copy-on-write: http://en.wikipedia.org/wiki/Copy-on-write
- Near CDP: http://searchdatabackup.techtarget.com/definition/near-continuous-data-protection-near-CDP
- Deduplication: http://en.wikipedia.org/wiki/Data_deduplication
- Obnam download: http://liw.fi/obnam/download/
- GnuPG: http://gnupg.archive.sunet.se/documentation/index.en.html
- FUSE: http://en.wikipedia.org/wiki/Filesystem_in_Userspace
- "Vive la Différence" by Heike Jurzik, Linux Magazine , Issue 74, 2007: http://www.linux-magazine.com/Issues/2007/74/Command-Line-Diffutils/28language29/eng-US
- "On the Dot" by Heike Jurzik, Linux Magazine , Issue 65, 2006: http://www.linux-magazine.com/Issues/2006/65/Command-Line-at-and-cron/28language29/eng-US
- "At the Press of a Button" by Falko Benthin, Linux Magazine , Issue 144, 2012: http://www.linux-magazine.com/Issues/2012/144/luckyBackup/28language29/eng-US
« Previous 1 2 3 Next »
Buy this article as PDF
Pages: 4
(incl. VAT)