Expand description
§Simple utility to rotate backup files
Typical use:
ls *.tar | rotate_backup --output delete | xargs rm -f§Providing the files
You can either provide files as argument or via stdin:
ls *.tar | rotate_backup --output delete | xargs rm -f(requiresstdfeature)rotate_backup --output delete $(ls *.tar) | xargs rm -f
§Selecting output
By default, only file to keep are shown (equivalent to --output keep).
Otherwise, you can use --output delete
§Date format
By default, the tool looks for this format: YYYY-mm-dd, but you can select a different format:
rotate_backup --format "%Y%m%d"
This will parse 20240213 for instance.
§Choosing how much logs are kept
The tool uses an exponential function based on days since the oldest backup.
This is inspired from frotate
You can choose the base for the exponent: rotate_backup --base 1.2.
Note that only base > 1.0 are accepted.
Modules§
Structs§
- Parameters
- Rotate your backup files
- Partition
Index - Index of a partition
- Partition
Size - Size of a partition