From 6037bdb376603e4572a2ec57c5335eed7496731d Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 8 Oct 2012 09:12:23 +0100 Subject: [PATCH] rsync-backup.in, rsync-backup.8: Ensure the store filesystem is mounted. Previously this was left as the responsibility of some wrapper script, but that's really annoying, and we should do it ourselves. --- rsync-backup.8 | 4 ++++ rsync-backup.in | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/rsync-backup.8 b/rsync-backup.8 index a32c656..a265352 100644 --- a/rsync-backup.8 +++ b/rsync-backup.8 @@ -364,6 +364,10 @@ Backup trees are stored in a fairly straightforward directory tree. At the top level is one directory for each client host. There are also some special entries: .TP +.B \&.rsync-backup-store +This file must be present in order to indicate that a backup volume is +present (and not just an empty mount point). +.TP .B fshash.cache The cache database used for improving performance of local file hashing. There may be other diff --git a/rsync-backup.in b/rsync-backup.in index 5c9a54c..705696d 100644 --- a/rsync-backup.in +++ b/rsync-backup.in @@ -606,6 +606,15 @@ backup () { ## Back up the filesystems on the currently selected host using the ## currently selected snapshot type. + ## Make sure that there's a store volume. We must do this here rather than + ## in the main body of the script, since the configuration file needs a + ## chance to override STOREDIR. + if ! [ -r $STOREDIR/.rsync-backup-store ]; then + echo >&2 "$quis: no backup volume mounted" + exit 15 + fi + + ## Back up each requested file system in turn. for fs in "$@"; do ## Parse the argument. -- 2.11.0