hello
the problem is that rsnapshot does "fear the unknown" (line 1004 in
ubuntu's rsnapshot). below is the last else clause checking
different formats of the backup source inside the sub parse_config_file:
# fear the unknown
} else {
config_err($file_line_num, "$line - Source directory \"$src\"
doesn't exist"); next;
}
in some situations it should not fear, because it does not need (the
unknown) source directory:
- as mentioned by the op it should not fear if it is just rotating
- when invoking diff or du
this leads to situations where 'rsnapshot -c ... diff' with one config
file bails but using another config file, where the source exists (but
does not matter) _to diff directories of the same snapshot root_ works
flawlessly:
/data/backup/system# rsnapshot
-c /root/backup-scripts/settings/hostname/rsnapshot-root.conf diff
bootly.[01]
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these
options: /usr/bin/rsnapshot -c
\ /root/backup-scripts/settings/hostname/rsnapshot-root.conf diff
bootly.0 \ bootly.1
----------------------------------------------------------------------------
ERROR: /root/backup-scripts/settings/hostname/rsnapshot-root.conf on
line 223: ERROR: backup /mnt/root-snapshot root/ \
exclude=dev,exclude=tmp,exclude=lib/udev/,exclude=var/spool \
- Source directory "/mnt/root-snapshot" doesn't exist
ERROR:
---------------------------------------------------------------------
ERROR: Errors were found
in /root/backup-scripts/settings/hostname/rsnapshot-root.conf, ERROR:
rsnapshot can not continue. If you think an entry looks right, make
ERROR: sure you don't have spaces where only tabs should be.
================================
the second one uses the default config file (which i don't use
normally) with this backup points which all exist:
backup /home/ localhost/
backup /etc/ localhost/
backup /usr/local/ localhost/
/data/backup/system# rsnapshot diff bootly.[01]
Comparing bootly.1 to bootly.0
Between bootly.1 and bootly.0:
92 were added, taking 6362802 bytes;
85 were removed, saving 6292118
================================
my perl skills are non-existent and i did not read a lot of
rsnapshot's code, but my general idea to fix this problem would be:
- define all cases where the source directory is not need
- set a global variable or argument of parse_config_file to indicate
when this is the case
- skip the source directory check in parse_config_file according to
this information
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]