Rsnapshot loses directory slash when using rsync_long_args=

643 Views Asked by At

I am using rsnapshot for backups and noticed a problem.

I defined some rsync_long_args in the rsnapshot.conf file

rsync_long_args         --delete --numeric-ids --relative

Further in the file, when declaring BACKUP POINTS / SCRIPTS, I need to add some specific sync_long_args that will use the initial sync_long_args, add or overwrite the args, example:

backup  [email protected]:/usr/local/nagios/        myserver/   rsync_long_args=--compress-level=5

And there I have a problem, when testing the rsnapshot with the -t option, I am geting:

/usr/bin/rsync -a --delete --numeric-ids --relative      --link-dest=/data/backups/rsnapshot/daily.1/myserver/      [email protected]:/usr/local/nagios/      /data/backups/rsnapshot/daily.0/myserver/

You can notice here that the address of the source dir is

[email protected]:/usr/local/nagios/

There is the last slash that will only copy the content of the /usr/local/nagios directory, and I need the full path, so the slash shouldn't be there.

If I remove the rsync_long_args= in the BACKUP POINTS / SCRIPTS, then the slash is not there anymore.

Any idea why?

1

There are 1 best solutions below

0
On BEST ANSWER

I found the solution, it is enough to add + in frond of the rsync_long_args

backup  [email protected]:/usr/local/nagios/        myserver/   +rsync_long_args=--compress-level=5