0

I've got rdiff-backup up & running nicely using cron jobs over SSH between two VMs (my webserver and a backup space), using scripts put together from various places online.

I'm backing up various folders, including database dumps, /etc and /var/www. I've noticed that the script uses the --backup-mode for the webroot folder, but not for the others.

Can anyone explain what this option does? All I can find online is the man page which doesn't shed much light on things:

Force backup mode even if first argument appears to be an increment or mirror file.

I can't find any mention of what 'backup mode' is anywhere else.

Thanks!

1 Answers1

1

Looking at the rdiff-backup (1.2.8) source code, in Main.py it's possible to see that 'backup' is the default action when no other option is supplied:

def final_set_action(rps):
"""If no action set, decide between backup and restore at this point"""
global action
if action: return
assert len(rps) == 2, rps
if restore_set_root(rps[0]): action = "restore"
else: action = "backup"

So unless the script you are using has a file that looks like "an increment / mirror file in it's first argument" then it will be safe to omit the --backup-mode option.

What's not clear to me is what defines an rdiff-backup increment or mirror file. They can be found in the rdiff-backup-data directories that are created on the destination. These have .data and .gz extensions, so I'm guessing that --backup-mode is to make sure that rdiff-backup will run if a file of these types is specified as an argument.

keybits
  • 126
  • 3