https://bugzilla.samba.org/show_bug.cgi?id=10338
Summary: Start deletion from the top of the hierarchy Product: rsync Version: 3.1.0 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 Component: core AssignedTo: way...@samba.org ReportedBy: ben.rub...@gmail.com QAContact: rsync...@samba.org I make my production backups with Rsync. Here is an example of my backup tree on the destination server : /backups /2013-04-03 /2013-04-02 /2013-04-01 /2013-03-31 /2013-03-30 /2013-03-29 At the end of the backup process, I upload a logfile in the backup directory and delete oldest backups. For this, I use an include/exclude file, for example this inclexcl.txt : + /2013-04-03 + /2013-04-03/logfile.log - /2013-04-03/* - /2013-04-02 - /2013-04-01 I also use this empty directory where my logfile is : /tmp /path /2013-04-03 /logfile.log And I run this rsync command : rsync -a --delete-after --exclude-from=inclexcl.txt /tmp/path/ server::backups/ Perfect, it works, my logfile is uploaded and oldest backups are deleted (in this example all backups of March). However, what I can see in the daemon's log is that Rsync is browsing from the top down all files of the backup directories to delete, and delete them one by one. Rsync behavior is to make a list of the files and check if any are "protected" from deletion before it removes the file. As each of my backup directories contains hundreds of thousands of files, deletion take a very long time. I think that it could be interesting to have the ability to skip this check, to ask Rsync to start deletion from the top of the hierarchy. Perhaps adding a new option (--delete-from-top) ? It would for sure speed up deletion of huge directories, for instance common daily backup directories (made for example with --link-dest), saving Rsync overhead. Thank you very much for this improvement ! Best regards, Ben -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. -- 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