Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
up vote 1 down vote accepted

Looking at the rdiff-backup (1.2.8) source code, in 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.