Some weeks have passed since the announcement of kaveau. I’m really proud and happy about this project because I received a lot of positive feedback messages and it has been chosen as one of the best Hackweek’s projects.

In the meantime I kept working on kaveau, so let me show you what has changed:

  • rdiff-backup has been replaced by rsync.
  • the setup wizard has been improved according to the feedback messages I received.
  • old backups are now automatically removed.
  • the code has been refactored a lot.

The switch to rsync

Previously kaveau used rdiff-backup as backup back-end. rdiff-backup is a great program but unfortunately it relies on the outdated librsync library. The latest release of librsync is dated 2004. It has a couple of serious bugs still open and, while rsync has reached version three, this library is still stuck at version one.

These are the reasons of the switch from rdiff-backup to rsync. This choice breaks the compatibility with the previous backups but it introduces a lot of advantages.
One of the most important improvements brought by the adoption of rsync is an easier restore procedure: now all the backups can be accessed using a standard file manager, while previously rdiff-backup was needed to access the old backups.

Backup directory structure

On the backup device everything is saved under the kaveau/hostname/username path.

The directory will have a similar structure:

drwxr-xr-x 3 flavio users 4096 2009-09-12 18:50 2009-09-12T18:50:19
drwxr-xr-x 3 flavio users 4096 2009-09-14 23:07 2009-09-14T23:07:46
drwxr-xr-x 3 flavio users 4096 2009-09-14 23:30 2009-09-14T23:30:36
lrwxrwxrwx 1 flavio users   19 2009-09-14 23:30 current -> 2009-09-14T23:30:36

As you can see there’s one directory per backup, plus a symlink called current pointing to the latest backup.

Old backup deletion

Nowadays big external storage devices are pretty cheap, but it’s always good to save some disk space.
Now kaveau keeps:

  • hourly backups for the past 24 hours.
  • daily backups for the past month.
  • weekly backups until the external disk is full.

Thanks to hard links’ magic, old backups can be deleted without causing damages to the other ones.

Plans for the future

Before starting to work on the restore user interface I will spend some time figuring out how to add support for network devices.

A lot of users requested this feature, hence I want to make them happy :) .

I’m planning to use avahi to discover network shares (nfs, samba) or network machines running ssh and use them as backup devices. Honestly, I want to achieve something similar to Apple’s time capsule.

As usual, feedback messages are really appreciated.

Tags: , ,
15 Responses to “kaveau updates”
  1. Does this mean that there is a complete folder structure for each backup? The problem with this is that if the user has even a moderately large amount of folders each structure will take a non-negligible amount of space on disk :( this is where folder hardlinking comes in handy.

    I’ve been playing around with a similar goal (my work is up at http://gitorious.org/timevault) and although I’m currently using rdiff-backup I’m not happy with it either. Anyways, the idea was that the user would config the backup from a kcm_module and that backups would be run automatically on an hourly (or ideally, semi-continuous, but this would require quite a few more pieces) basis.

    • Flavio says:

      Yeah, not having folder hard links wastes some space. But IMHO having a complete folder structure for each backup is a great advantage.

      Maybe one day it will be possible to enable directory hard links with a special mount option…

  2. Jeffery says:

    This looks good! While I don’t know if it suits my purposes, I will definitely be recommending it to others when it’s stable.
    FYI, I’ve uploaded a GIT PKGBUILD to the Arch Linux AUR for this, so Archers can get their development builds all nicely packaged and happy. http://aur.archlinux.org/packages.php?ID=30165

  3. Hi,
    I had already commented on an article before (http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/comment-page-1#comment-9616), but this looks really promising!

    Is it possible to configure the folders which kaveau is going to back up? I have a 31GB home directory (and not everything is needed for backup). Keeping backups for only this months requires a hard disk of 1674GB, so only a 2TB drive will be enough! That’s a massive amount of data! And 31GB isn’t really that much…
    Unfortunately you switched from rdiff-backup to rsync: the rdiff-backup utility was capable of saving the changes only so that saves *a lot* of hard disk space.

    So, to save hard disk space, is it possible to configure the folders to backup and/or to configure the period to wait between backups? I am glad you create a very simple backup utility, but I don’t like to spend that much for a hard disk drive ;)

    • Flavio says:

      Excuse me if I didn’t reply to your first message.
      You can exclude some folders from the backup using the “filters” button.

      I know it would make sense to provide a gui for selecting the folders to backup, I’m also thinking about adding some configuration page for expert users.

      • Aurel. says:

        A very cool option would be add a “Backup this directory” menu in Dolphin.

        Then, when this directory is browsed, a time line could be proposed, similar to what has been done for the integration of ZFS snapshots in Nautilus, cf. http://tinyurl.com/3qo9jk

        What do you think about that ? Would it be possible ??

  4. gp says:

    Great, this is a great project.
    I hope this will be included in KDE because is a essential tool.

    giuseppe

  5. schmeisser says:

    nice job, maybe I can replace my handwritten scripts (that do exactly the same thing) soon with a cool and proper application

  6. Xav says:

    Um, maybe not a good place to ask, but I didn’t know where else…
    If make gives me that, what could be wrong?

    [ 56%] Building CXX object src/app/CMakeFiles/kaveau.dir/kaveau_automoc.o
    In file included from /home/xaverw/build/kaveau-git/src/kaveau-build/src/app/kaveau_automoc.cpp:5:
    /home/xaverw/build/kaveau-git/src/kaveau-build/src/app/moc_addbackupwizardpage2.cpp: In member function »virtual int AddBackupWizardPage2::qt_metacall(QMetaObject::Call, int, void**)«:
    /home/xaverw/build/kaveau-git/src/kaveau-build/src/app/moc_addbackupwizardpage2.cpp:74: Fehler: invalid use of incomplete type »struct QVariant«
    /usr/include/QtCore/qobject.h:65: Fehler: forward declaration of »struct QVariant«
    /home/xaverw/build/kaveau-git/src/kaveau-build/src/app/moc_addbackupwizardpage2.cpp:74: Fehler: Argument 2 von »void AddBackupWizardPage2::slotSetupDone(Solid::ErrorType, QVariant, QString)« wird initialisiert
    make[2]: *** [src/app/CMakeFiles/kaveau.dir/kaveau_automoc.o] Fehler 1
    make[1]: *** [src/app/CMakeFiles/kaveau.dir/all] Fehler 2
    make: *** [all] Fehler 2
    ==> FEHLER: Build fehlgeschlagen.
    Breche ab …

    • Flavio says:

      This is strange, I don’t get this error locally.
      BTW I have just pushed a fix, let me know if the problem persists.

      • Xav says:

        Yes, it does. I am building this from the above ArchLinux User Repository (AUR) link…

        BTW, before the final error there are some warnings, maybe they can help you!
        (if you don’t speak geman, it says
        (…)cpp:36: Warning: Comparison of an unsigned expression >= 0 is always true
        (…)cpp:37: Warning: Division by zero

        [ 8%] Building CXX object src/utils/CMakeFiles/kaveau_utils.dir/common.o
        /home/xaverw/build/kaveau-git/src/kaveau-build/src/utils/common.cpp: In function »const QString bytesToHuman(qulonglong)«:
        /home/xaverw/build/kaveau-git/src/kaveau-build/src/utils/common.cpp:36: Warnung: Vergleich eines vorzeichenlosen Ausdrucks >= 0 ist stets »wahr«
        /home/xaverw/build/kaveau-git/src/kaveau-build/src/utils/common.cpp:37: Warnung: Division durch Null

        Then it continues a little before the kaveau_automoc error I already posted comes up.

  7.  
Leave a Reply