RDiffFS is a program providing a virtual filesytem view onto a backup created using rdiff-backup.

rdiff-backup backs up one directory (a) to another (b). The destination (b) contains a full copy of the current (a), plus the required bits and pieces to recreate previous versions of (a). RDiffFS exposes the previous versions in a filesystem.

At the moment, RDiffFS should be considered alpha quality.

Download

The code is available at github. (clone the git repo anonymously from git://github.com/jmtd/rdifffs.git).

I hope to have more "proper" binary packages available soon. In the meantime, here's a tarball from my system (Linux 2.6.37-rc7+ i686):

Usage example

$ ./rdifffs ./real/dest ./mnt 
$ ls mnt
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-04T18:18:15Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-04T18:18:17Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-04T18:18:18Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-06T12:28:31Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-07T13:04:04Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-09-04T16:38:10+01:00
lr-xr-xr-x 2 jon jon   11 Jan  1  1970 current -> 2010-09-04T16:38:10+01:00
$ cat mnt/*/a
Thu Feb  4 18:18:10 GMT 2010
Thu Feb  4 18:18:17 GMT 2010
Sat Sep  4 16:38:02 BST 2010
Sat Sep  4 16:38:02 BST 2010
Thu Feb  4 18:18:18 GMT 2010
Sat Sep  4 16:38:02 BST 2010
Sat Sep  4 16:38:02 BST 2010

Building/Installing RDiffFS

RDiffFS is written in Haskell and requires a Haskell compiler to build and a runtime to run. It has been developed with ghc6 version 6.12.1.

RDiffFS makes use of (at least) the following additional libraries:

Install these via cabal, or apt on a Debian system (at the time of writing, HFuse is in the NEW queue waiting to join Debian sid).

Hopefully, RDiffFS will be available via cabal in the near future.

Consult the supplied Makefile to build RDiffFS.

Running RDiffFS

Pass the underlying rdiff-backup directory as the first argument. All the other arguments are handled by FUSE. Supply at least a mount point.

$ ./rdifffs ./real/dest ./mnt 
$ ls mnt
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-04T18:18:15Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-04T18:18:17Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-04T18:18:18Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-06T12:28:31Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-02-07T13:04:04Z
drwxr-xr-x 4 jon jon 4096 Feb  7  2010 2010-09-04T16:38:10+01:00
lr-xr-xr-x 2 jon jon   11 Jan  1  1970 current -> 2010-09-04T16:38:10+01:00
$ cat mnt/*/a
Thu Feb  4 18:18:10 GMT 2010
Thu Feb  4 18:18:17 GMT 2010
Sat Sep  4 16:38:02 BST 2010
Sat Sep  4 16:38:02 BST 2010
Thu Feb  4 18:18:18 GMT 2010
Sat Sep  4 16:38:02 BST 2010
Sat Sep  4 16:38:02 BST 2010

You might find the fuse argument '-d' useful: this causes RDiffFS not to fork and relinquish the terminal. It also prints out a lot of debugging information (which you could direct at /dev/null). I have found rdiffs more stable in this configuration (I think we expose a bug/bugs in Fuse or HFuse).


Comments