Skip to content

Examples from the config file cannot be parsed #1

Open
@rkandilarov

Description

@rkandilarov

Hi!

I've tested rsnapshot-ng on Ubuntu 16.04

wget -O - https://packages.aenon-dynamics.com/static/pubkey.pgp | apt-key add - 
echo "deb https://packages.aenon-dynamics.com/debian stable main" > /etc/apt/sources.list.d/aenon-dynamics.list
apt update
apt install -y rsnapshot-ng

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscope/docsrelated to the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions