obwrap.git Wrapper for obnam

Clone urls
Last update


obwrap is a simple wrapper application for the Obnam backup application. In fact, it can wrap any command.

obwrap can run commands

  • before obnam (pre)
  • after obnam (post)
  • after an error occured (error)


The default configuration (/etc/obwrap/obwrap.cfg) looks like this

# obnam = obnam
# args =

#pre = 
#post = 
#error =

This configuration will only call obnam without any pre, post, error commands.

The values in the [commands] section are parsed with the shlex module.

To include command line arguments, enclose the commands with quotes:

pre = "/bin/echo foo bar baz"

pre, post and error support an arbitrary list of commands, seperated by spaces.

Note: Every command is fatal. When a pre-command does not complete successfully, obwrap will not execute obnam!

If you want a non-fatal command, either make sure that it always exit with zero, or do something like:

pre = "/bin/false; /bin/true"