rsync protection filter for backed-up files

Jacob Balazer balazerrsync at umich.edu
Sat Nov 1 21:43:03 GMT 2008


I'm trying to have rsync keep backups of changed and deleted files.
Following the examples in the man page, I've set the backup suffix and
created a protection filter:

  --delete --backup --suffix=~`date +"%Y-%m-%d"` --filter='Pp *~????-??-??'

But using this protection filter, not all of my backup files were
protected from deletion.  In each subesquent run of rsync, it would
try to delete some of my backup files.  The net effect was that the
backed up files kept getting renamed with an ever longer string of
appended suffixes.

I changed the filter to read as follows

  --delete --backup --suffix=~`date +"%Y-%m-%d"` --filter='P *~????-??-??'

and then it worked correctly.  Is "Pp" filter option as shown in the
rsync manual page under the description of --backup a mistake?  Or am
I misunderstanding something about the way the protection filter is
supposed to work?   I'm using rsync 3.0.2 under Cygwin.

Thanks,
Jacob


More information about the rsync mailing list