chiark / gitweb /
rsync-backup.{in,8}: Introduce `hook' concept.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 16 Jan 2014 09:51:56 +0000 (09:51 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 16 Jan 2014 10:13:50 +0000 (10:13 +0000)
commit9b1d71c6944756a0a732b8553d0516c3f0e720e2
treea92db65594580ad8c6ca454c6fb33696fca772a1
parent5b4c55ab790babed1a442f7204356c24663fe15c
rsync-backup.{in,8}: Introduce `hook' concept.

I want to make the configuration file so that it can be read by
scripts which don't actually want to run a backup.  Therefore, code
which currently runs unconditionally to (e.g.) copy metadata onto the
backup volume must be wrapped up in a function.

To make this a bit more disciplined, introduce a general idea of hooks
which are run with arguments.  The existing `backup_precommit_hook'
and `backup_commit_hook' functions are subsumed by this, still
provided for compatibility.  New hooks are added at the start of the
whole backup, at the beginning of each filesystem dump, and at the end
of the whole operation.
rsync-backup.8
rsync-backup.in