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.

Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html