You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then uncomment in /etc/rsnapshot.conf the following line:
# EXAMPLE.COM
backup_exec /bin/date "+ backup of example.com started at %c"
and running rsnapshot configtest I receive:
ERROR: /etc/rsnapshot.conf on line 225:
ERROR: backup_exec /bin/date "+ backup of example.com started at %c" - \
requirement level "+ backup of example.com started at %c" is \
invalid
ERROR: ---------------------------------------------------------------------
ERROR: Errors were found in /etc/rsnapshot.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.
It seems that rsnapshot-ng expect the command to be only the first parameter after backup_exec so wrapping all argument inside quotation marks like:
backup_exec "/bin/date '+ backup of example.com started at %c'"
seems to do the trick. The second argument to the backup_exec command seems to be either empty (or string optional) or the string required as per line 1144. But, I'm not a python guy and cannot understand howto escape the quotations in case I need them inside the command itself - backslash " does not work.
Is this expected behaviour?
Perhaps all examples need to be changed if I got right the idea behind backup_exec.
Kind regards!
The text was updated successfully, but these errors were encountered:
the first argument includes the command (with all arguments). the second one defines the importance (how errors of the command should be handled by rsnapshot.
i have to update the docs, because of the new config parser the "old" command strings with spaces won't work anymore - therefore it has the be wrapped in quotes
best regards, Andi
from the original docs:
backup_exec simply runs the command listed. The second argument is not required and defaults to a value of 'optional'. It specifies the importance that the command return 0. Valid values are 'optional' and 'required'. If the command is specified as optional, a non-zero exit status from the command will result in a warning message being output. If the command is specified as 'required', a non-zero exit status from the command will result in an error message being output and rsnapshot itself will exit with a non-zero exit status.
Hi!
I've tested rsnapshot-ng on Ubuntu 16.04
Then uncomment in /etc/rsnapshot.conf the following line:
and running
rsnapshot configtest
I receive:It seems that rsnapshot-ng expect the command to be only the first parameter after backup_exec so wrapping all argument inside quotation marks like:
seems to do the trick. The second argument to the backup_exec command seems to be either empty (or string optional) or the string required as per line 1144. But, I'm not a python guy and cannot understand howto escape the quotations in case I need them inside the command itself - backslash " does not work.
Is this expected behaviour?
Perhaps all examples need to be changed if I got right the idea behind backup_exec.
Kind regards!
The text was updated successfully, but these errors were encountered: