[[!tag obnam]]

I have some specific ideas for the command line interface I'm planning for my backup program. I'll be writing a man page for obnam, but before I do that, here's a sketch.

  • obnam backup --store sftp://example.com/~/backups/ $HOME
  • obnam ls --generation latest
  • obnam verify
  • obnam fsck
  • obnam restore --generation latest --to /var/tmp/liw.restore
  • òbnam forget --keep 1h:7d:5w:12m:99y

The backup command should be obvious. I'll make a configuration file so the location of the backup store can be specified there, rather than every time on the command line. Also other arguments, such as the directories to back up.

The ls command lists the contents of a backup generation.

The verify command compares what has been backed up with what is on the hard disk now, reporting differences. If you back up and then immediately verify, you can check that everything got backed up. Verify will also be able to do things like compare randomly selected files (rather than all of them). I am not yet sure exactly how the verification process should happen to make things trustable.

fsck checks that the internal data structures in the backup store are OK.

restore restores.

forget removes old backup generations. It will be able to remove specific generations, or apply a policy such as "keep one hour, seven daily, five weekly, twelve monthly, and lots of yearly generations". It will be cheap to keep lots of generations, since obnam will do heavy de-duplication, at the block level.