rsnapshotrsnapshot  Web // Projects // Software // rsnapshot

rsnapshot niceties

rsnapshot is a collection of scripts for data backup.

There are several documentations for rsnapshot, for example

Apart from the typical examples and descriptions there are a few questions that are not answered so often:

How to backup directories that got spaces in their names ?

How to deal with network interrupts / distortion ?

Combining the two issues

Spaces in directory names

In version 1.3.0 spaces in path names are escaped with a leading backslash (\):

backup User@Host:/Folder/Subfolder\ with\ spaces/* TargetFolder/

Unfortunately this syntax does not work anymore in the newest version 1.3.1. To backup folders containing spaces in their names you have to use version 1.3.0.


Network interruption

When using rsnapshot to backup data on a WAN (Wide-Area-Network) there is a higher risk that the network connection is interrupted.

If rsync is not configured properly then interruptions are not detected properly and the backup process will hang and stop working. This can be solved by adding the parameter timeout to rsync_long_args, for example:

rsync_long_args --timeout=600 --delete --numeric-ids --relative --delete-excluded

Detecting network errors is not the final solution. The backup-process will be ended, but the backup is not executed any more.

From version 1.3.1 on there is a new parameter rsync_numtries. This parameter describes, how often rsnapshot will try to execute the backup. The value should be at least 3:

rsync_numtries 4


The combination

So, for backing up folder containing spaces in their names you need version 1.3.0 / to make more than one attempt for backup you need version 1.3.1. What to do, if you want to deal wit both issues ?

I have changed the script from version 1.3.0, so that it includes the new parameter  rsync_numtries from version 1.3.1.

The script can be downloaded here. Overwrite your existing rsnapshot with the included file. (But dont forget to backup before :-) )