Syntax for using rsync options --exclude and --delete!
jw schultz
jw at pegasys.ws
Wed Nov 20 21:30:00 EST 2002
On Wed, Nov 20, 2002 at 02:19:20PM -0500, Leslie_Branch at hgsi.com wrote:
> Hello All,
>
> I was wondering if anyone has a viable syntax solution for using rsync with
> the --exclude and --delete option.
>
> I have been using the rsync process to backup certain files and filesystems
> for ease of recovery in the event of unexpected downtime on the primary. I
> recently noticed that the process is not deleting files on the destination
> host that were removed from the source at some point in time. According to
> the options summary you can use the --delete option to accomplish this
> however, I have not been successful in getting this to work in my test
> environment and need your help.
>
> Current Syntax:
> rsync -vaox --exclude ".snapshot" * [destination]
> NOTE: Current directory is source.
>
> I have tried the following scenarios in my test environment:
> rsync -vaox --exclude ".snapshot" --delete * [destination]
> rsync -vaox --delete --exclude ".snapshot" * [destination]
> rsync -varox --exclude ".snapshot" --delete * [destination]
> rsync -varox --delete * [destination]
> rsync -vaox --delete * [destination]
>
> Please help!
>
> Btw - I am using rsync version 2.3.1
>
> THANKS IN ADVANCE FOR YOUR HELP!
>
> Leslie
The * is expanded by the shell. It doesn't include dot files
therefore rsync won't even see them. Use . if you wish to
syncronize the current directory.
Also see --delete-excluded
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync
mailing list