http://www.mail-archive.com/rsync@lists.samba.org/msg21380.html

I ran into the same issue a few years ago, solved it, forgot the solution and
then rediscovered it this evening. I think my solution is actually a little
simpler and easier to follow than the arrays proposed by a couple of other
list members, so I thought I'd pass it on. I'm not subscribed to the list, but
it looks like non-subscribers can still post (if this gets bounced, I guess I
will know I was incorrect in that assessment!) ...

----
#!/bin/sh
HOST=machine1
MIRROR=machine2
SRCDIR=/path/to/data
DSTDIR=/backups/path/to/data
SSH='/usr/bin/ssh -c blowfish'
RSYNC='/usr/bin/rsync -Lavz'
$RSYNC -e "$SSH" $HOST:$SRCDIR $MIRROR:$DSTDIR
----

I'm sure you've probably solved it and moved on, but I wanted to pass this on
anyway in the hopes that it's useful (or at least interesting :)). You can
wrap other problematic arguments in the same way as $SSH above and pass them
as well. As of version 3.0.0, rsync supports a -s flag that supposedly
mitigates some or all of these kinds of issues by bypassing remote shell
interpolation altogether. Dunno how well it works, because I haven't had a
chance to test with 3.x yet.

cheers,
-- 
       Scott Francis | darkuncle(at)darkuncle(dot)net | 0x5537F527
                        Less and less is done
                     until non-action is achieved
             when nothing is done, nothing is left undone.
                                    -- the Tao of Sysadmin

Attachment: pgpMOyuHSRdG7.pgp
Description: PGP signature

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to