Jan Danielsson a écrit : > Hello all, > > I have a backup system which produces files using the following pattern: ... > > Obviously, I have little need for *all* those files. What I want to > do is to delete old files according to this pattern: > > - Keep all backup files which are two weeks, or less, old > - If backups are more than two weeks old, then keep only the latest > one for each week. > - If backups are more than two months old, then keep only the latest > one for each month. > - If backups are more than two years old, then keep only the latest > one for each year.
You should take a look at snapy, AFAIR it does things like this to manage snapshot backups (with cp [+rsync] [+ssh]). http://www.flibuste.net/libre/snapy/ -- http://mail.python.org/mailman/listinfo/python-list