DO NOT REPLY [Bug 6061] New: [FMR]: Add an option to only delete files once they expire

samba-bugs at samba.org samba-bugs at samba.org
Thu Jan 22 07:53:26 GMT 2009


https://bugzilla.samba.org/show_bug.cgi?id=6061

           Summary: [FMR]: Add an option to only delete files once they
                    expire
           Product: rsync
           Version: 3.0.4
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: iwbb.bin at gmail.com
         QAContact: rsync-qa at samba.org


A really nice feature (since rsync is used quite a lot for backups) would be to
have a command line option to only delete/prune files when they expire rather
than as soon as they are non-existent on the source host.  

For example, using --delete-during will delete any files on the destination
host that are no longer on the source host.  However, it might have been a
mistake to remove the file on the source host or perhaps its not present due to
hardware failure (many scenarios spring to mind).  If a nightly rsync backup is
in operation then the files will be lost forever on both the source and
destination hosts on the day of deletion.

With an option like:

  --delete-expiry 30

...could ensure files are only deleted/pruned if they no longer exist on the
source host AND that their modification time on the destination host is older
than (in this example) 30 days.  Exactly like this:

  find /src -type f -mtime +30 -exec rm -f {} \;

One flaw is that you could potentially delete a file on the source host that
has already expired on the destination host, but for the majority of files
accessed frequently you can be rest assured you will still have a few days to
retrieve the file before its gone forever.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list