Backing up data isn't exactly exciting, but like washing laundry, everyone needs to do it. On Linux, you can back up your files using an almost-bewildering array of choices, from self-composed shell scripts, to expensive software packages. But how about a simple, open source, easy-to-use, set-up-and-fuggedaboutit tool?
Backing up data isn’t exactly exciting, but like washing laundry, everyone needs to do it. On Linux, you can back up your files using an almost-bewildering array of choices, from self-composed shell scripts, to expensive software packages. But how about a simple, open source, easy-to-use, set-up-and-fuggedaboutit tool?
Konserve is a small backup utility that lives in the KDE 3.x system tray, and it makes backups so easy, so automatic, that you’ll probably forget all about it… until you desperately need that file you accidentally deleted.
Let’s install Konserve and create a backup job to better understand the program.
If you use an APT-enabled distro, try apt-get install konserve. Otherwise, head over to http://konserve.sourceforge.net/download.html and grab the source code or a pre-compiled binary for SUSE, Debian, Mandrake, or Gentoo. Build the code (if necessary), install the application, and start the program from the K menu icon, or enter whereis konserve on the command line and run the binary that whereis finds. On Debian, the path is probably /usr/bin/konserve; on SUSE, it’s likely to be /opt/kde3/bin/konserve. If a little red soup can labelled “K” appears in your system tray, Konserve is running (and will automatically start with any reboot, unless you close it first).
A Sample Backup
Let’s back up your hidden KDE settings directory.
Right-click on the Konserve icon, and select Wizard. In step one, when prompted to name the “Backup Profile,” type kde_settings and press Next.
Step 2 asks for the pathname of the file or directory that you want to back up. Find your hidden KDE settings directory (probably /home/user/.kde/share/config), and press Next.
In step 3, choose a directory to save your backup.
If you enter a path ending in a directory (which can be local or accessed on a local network via Samba or NFS), Konserve creates a new, compressed, time-stamped (year-month-day-hour-minute-second) file every time it creates a backup. For example, config-20040729174523.tar.gz and config-20040730125247.tar.gz are two backup files automatically created by Konserve.
Even better, use KDE’s transparent networking to specify another machine, like this:
You can also specify a pathname ending in a filename, which causes each backup to overwrite the previous one.
Finally, in step 4, specify how often you want Konserve to perform the backup. Choose an integer greater than zero and then choose the interval, one of seconds, minutes, hours, or days. Check the box next to Backup active and press Next. (See Figure One.) Review your choices and press Finish.
|Figure One: With Konserve, you can backup frequently, easily|
From now on, you’ll have a regular backup of your KDE configuration directory. Sweet!
If you stick with Konserve, keep in mind that it performs full, not incremental backups, so everything in the specified directory is backed up every time. Also, if there are no changes in the source file or directory, Konserve skips the backup. If you backup directories, periodically delete old, unneeded backups, or you may find your repository filled up with a huge number of files.
Of course, if you backup, you’ll also want to restore. To restore a Konserve backup, right-click on the Konserve icon and choose Preferences. Select the backup profile that you want to recover and press Restore. Follow the instructions to retrieve your files, safe and sound.
One gotcha: you can’t restore from a remote backup created using sftp. In that case, manually download the file, uncompress it, and copy the files that you want.
And now, off to wash some clothes — while Konserve works silently in the background.
R. Scott Granneman teaches at Washington University, consults for Bryan Consulting, and writes for SecurityFocus and
Linux Magazine. You can reach him at firstname.lastname@example.org. Have a recommendation for this column? Send suggestions to email@example.com.
Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/linux-mag.com/site/www/htdocs/wp-content/themes/linuxmag/single.php on line 62