saintaardvark/adlibre-backup — pull request #1 by saintaardvark (2014-01-09 21:54:46+00:00)
Title: Invoke rsync from temporary file to prevent shell quoting interference

First things first: I would not at *all* be surprised if you reject this out of hand. :-)

As hinted at in the config files, adlbre-backup runs into some problems with shell quoting. I've tripped over this when trying to exclude a directory with spaces in its name ("System Volume Information"). The backup.conf file for that host includes this:

RSYNC_ADDITIONAL='--exclude="System Volume Information"'

No matter how I tried fiddling with the quoting, it always came out as some variation on:

... '--exclude="System"' '"Volume"' '"Information"' ...

which, of course, borked things badly. The only way I could find around this was to dump the rsync invocation into a text file and then point /bin/sh at that. It works for me, but I'm frustrated that I can't find a way around this, and as I say I won't be surprised if you just reject this out of hand. But on the off chance it's useful, here you go.

Thanks for your time, and let me know if you have any questions.