Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsync_long_args quotes not preserved #327

Open
2 tasks done
TesterTi opened this issue May 1, 2023 · 1 comment
Open
2 tasks done

rsync_long_args quotes not preserved #327

TesterTi opened this issue May 1, 2023 · 1 comment
Labels

Comments

@TesterTi
Copy link

TesterTi commented May 1, 2023

Checklist

  • I'm reporting a bug
  • I've searched the bugtracker for similar issues, including closed ones.

What did you do?

I add the following argument to the configuration file: --rsync-path='sudo rsync' (I have also tried with double quotes). The documentation states: Quotes are permitted in rsync_long_args, eg --rsync-path="sudo /usr/bin/rsync".

What happened?

The resulting command (rsnapshot -t daily) is:

/usr/bin/rsync -a --delete --numeric-ids --relative --delete-excluded
--rsync-path=sudo rsync --rsh=/usr/bin/ssh
--link-dest=backup_destination
username@server_to_backup:path_to_backup \

this causes an error with rsync (sudo: unrecognized option '--server') since it executes

/usr/bin/ssh -l username server_to_backup sudo --server ???????? --delete-excluded --numeric-ids --link-dest backup_destination . path_to_backup

What did you expect to happen

The quotes should be preserved and the following resulting command:

/usr/bin/ssh -l username server_to_backup "sudo rsync" --server --sender ???????? --numeric-ids . path_to_backup

how do I ensure that they are preserved?

My configuration

config_version 1.2
snapshot_root backup_destination
cmd_cp /bin/cp
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger /usr/bin/logger
cmd_du /usr/bin/du
retain daily 7
retain weekly 4
retain monthly 3
verbose 2
loglevel 3
logfile /var/log/rsnapshot.log
lockfile /var/run/rsnapshot.pid
rsync_long_args --delete --numeric-ids --relative --delete-excluded --rsync-path='sudo rsync'
exclude .cache
exclude /.local/share/Trash
exclude .Trash
exclude /Trash
exclude /.gvfs
exclude /.local/share/gvfs-metadata
exclude .dbus
exclude .aptitude
exclude .dropbox
exclude .dropbox-dist
exclude .thumbnails
exclude Dropbox
exclude /.local/share/tracker
exclude .thumbnails
exclude .thumb
exclude .DS_Store
exclude /.virtualenvs
exclude /thinclient_drives
link_dest 1
use_lazy_deletes 1
backup username@ server_to_backup:path_to_backup backup_destination/backups

Environment

OS: Ubuntu 22.04.2
Filesystem: ext4

Other information

No response

@TesterTi TesterTi added the bug label May 1, 2023
@daniron26
Copy link

I have the same problem.

Trying to escape the offending space character:

rsync_long_args --rsync-path=sudo\ rsync

Which had the effect of making the rsnapshot -t alpha outputted command execute without error, but in actual use there is still the error:

Unexpected remote arg:...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants