dspinellis / fileprune Goto Github PK
View Code? Open in Web Editor NEWPrune a file set according to a given age distribution
Home Page: http://www.spinellis.gr/sw/unix/fileprune/
License: Apache License 2.0
Prune a file set according to a given age distribution
Home Page: http://www.spinellis.gr/sw/unix/fileprune/
License: Apache License 2.0
It would be nice if I could tell fileprune to keep deleting file until n bytes are free on the file system – this seems to be the most natural choice for backups on a dedicated disk. This would also go well with pruning directories (issue #1) even without having a reliable way of calculating the spaces used by a directory.
I might not trust my file system meta data always and might not want to risk fileprune to delete all my backjust just because I accidentally ran touch *
. As often the directories are named by $(date -R)
or something similar, it would be nice if fileprune would take a strptime
pattern and apply that to the file name to get the file’s age.
(JFTR, this ways already reported by mail).
It would be nice if fileprune was able to prune whole directories. This would probably not go well with with the size constraint (-s
), but otherwise it should work.
The setting fileprune -e 1.25
works well for my backups which I do daily. But a backup that is only done occasional, I find the results surprising:
2015-03-23.20h58
2015-05-01.09h41
2015-08-09.16h04
2015-09-28.22h51
2015-11-29.19h16
2016-01-02.18h59
2016-02-10.23h26
2016-02-28.11h58
2016-03-17.11h51
2016-04-07.19h16
2016-05-14.20h59
2016-05-24.13h25
2016-05-31.19h39
2016-06-06.12h37
2016-06-28.10h29
The first column lists backups retained, while the second backups deleted. Why does it delete all those backups?
Hi,
in certain circumstances, fileprune seems to be happy to delete the youngest backup. This is most likely not what you want, e.g. if there is a symbolic link pointing to the "latest" which is used as a source for rsync --link-dest
. Maybe that should be special-cased?
(I’m still using my own fork which can handle directories and stuff, so if this does not apply to the mainline, sorry.)
Greetings,
Joachim
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.