exclude based on UID/GID?

Barry Robison barry at entityfx.com
Thu Mar 29 02:19:58 GMT 2007

I like to get ideas on excluding/including based on user or group id.
Right now I'm syncing from local to remote:

find show/season/episode/ -type f -and \( -uid 621 -or -uid 540 -or -uid
517 -or -uid 539 \) > /tmp/rsyncCron

/root/rsync/rsync -za -h --stats --numeric-ids
--files-from=/tmp/rsyncCron --relative ./ rsync://remote/root/

and then to sync from remote site to local

/root/rsync/rsync --delete --exclude-from=/tmp/rsyncCron
--exclude='/shot/*/maya/*' -za --stats -h --numeric-ids

However this runs the risk of any files created locally during the
length of the first rsync being deleted.

I've read through exclude.c and by passing the STAT_STRUCT around
instead of just the file path, it would be pretty easy to add exclude
flags for UID, GID, size, mtime, etc. Is this a reasonable approach?


More information about the rsync mailing list