Charles Curley wrote:

I'd like to run an rsync command to do backups, with an exclude
pattern. I can build what looks like a perfectly good command, echo
it, then run it. But the exclude pattern is ignored. However, if I
copy the echoed command line and execute it directly, it works and the
exclude pattern is respected.

Something like:


   # options to feed to rsync

   opts="-va --exclude '*~' --delete --delete-excluded"

   ....


   cmd="rsync $opts $internal$back/ $external$back"

   echo $cmd

   $cmd

When I do this, I always stick the ignore patterns in a file and use the --exclude-from=myfile.txt option. It's the only way I've found to make it behave consistently.

--Dave

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to