wildcards and nested files

Grant emailgrant at gmail.com
Tue Jul 2 12:30:33 MDT 2013


> I forgot the --delete.  Also, note that it will not delete an entire
> account that you have deleted from the source as /home/* will no
> longer match them.

You're saying if I rsync /home/user and then delete /home/user from
the source and rsync again with --delete, it won't delete /home/user
from the destination?  Is there a workaround for that?  I'd like to
keep the source and destination in sync.

- Grant


>>> I'm trying to use wildcards and nested files and I think there
>>> must be a better way than what I'm doing.  If I want to copy only
>>> these two directories:
>>
>>> /etc /home/*/.maildir
>>
>>> Is this the best way to do it:
>>
>>> rsync -arzv --delete-excluded --files-from 'files-from.txt'
>>> --include-from 'include-from.txt' --exclude-from
>>> 'exclude-from.txt' / rsyncuser at hostname:
>>
>>> files-from.txt: /etc
>>
>>> include-from.txt: /home /home/* /home/*/.maildir
>>
>>> exclude-from.txt: /home/*/*
>>
>>> - Grant


More information about the rsync mailing list