Re: How to delete files older than X on backup during sync?
Matthew, please remember to CC [email]firstname.lastname@example.org[/email] .
On Sun, 2008-11-09 at 15:46 -0500, Matthew Monaco wrote:[color=blue]
> You could use touch to update all of the files in your backup-dir. Then
> use my original suggestion to delete files that are older than two weeks.[/color]
I assume you mean, touch only the destination files corresponding to
source files that still exist (and you'd get that list from itemize
output)? That would work, but it loses the mtimes of the files, which
will make the rsync quick check fail and may make the backup less
useful. Using the atime instead would work nicely provided that the
atime field isn't being used for anything else and the destination
filesystem is mounted noatime.
> Matt McCutchen wrote:[color=green]
> > On Sun, 2008-11-09 at 19:03 +0100, Thomas von Eyben wrote:[color=darkred]
> >> Actually, I think I need to be a little more specific (now I think
> >> about it): I only want to keep the files that are deleted on the
> >> source for the additional period of two weeks.
> >> So I want to keep the back up identical to the source, just not
> >> deleting files in the backup that are deleted in the source (should be
> >> fairly easy with rsync ;-) BUT I only want to keep these
> >> deleted-on-source files for an additional period of two weeks…[/color][/color][/color]
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: [url]https://lists.samba.org/mailman/listinfo/rsync[/url]
Before posting, read: [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url]