Skip to main content

Lists files in that should be purged in a backup strategy where daily backups are kept for DAYS days, monthly backups for MONTHS months and yearly backups for YEARS years. Monthly and yearly backups are always the oldest possible daily backup (e.g. first of month and first of year that is available), and an option to keep RECENT most-recent backups is also available.

Files are expected to have their date embedded as YYYY-MM-DD somewhere in the filename, e.g. homedir-2013-03-31.tgz

For monthly and yearly backups, the first day available will be kept (e.g. January 1st for yearly, but if that is not available, January 2nd will be kept, etc..).

This program can be used together with xargs(1) from GNU findutils:

backuppurge --print0 /var/backups/ | xargs -r -0 rm

Only files directly in the specified DIRECTORY will be searched (in the above example, /var/backups/homedir-2013-03-31.tgz will be considered, but not /var/backups/etc/etc-2013-03-31.tgz). This prevents accidental deletion of files. If –include-directories (-D) is used, directories directly below the path will be included in the search (e.g. the directory /var/backups/etc-2015-07-24/ will be included in the purge search).

This script assumes daily backups are FULL backups, not incremental. For example, a full daily backup of your /etc can be created by adding (crontab -e) a command like the following to your crontab(5) file:

tar czf /var/backups/etc/etc-$(date +%F).tgz /etc

Metadata

Release files for backuppurge 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backuppurge 1.0.7
File Size Uploaded Provenance Actions
backuppurge-1.0.7.tar.gz 9.5 kB Without provenance Details for backuppurge-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for backuppurge 1.0.7
File Interpreter ABI Platform Actions
backuppurge-1.0.7-py3-none-any.whl Python 3 none any Details for backuppurge-1.0.7-py3-none-any.whl

Total release size: 20.7 kB

Release files / backuppurge-1.0.7.tar.gz

Download URL backuppurge-1.0.7.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d6f1583ab3b715fecf6224b8f8f74ea5b1f1d25ed69cee13ca664fbf38537d54
BLAKE2b-256 checksum
How to use checksums
bf7f502c50b43b9978691221d2d59b585e55715e7ee651ce946c39a8cf8c41d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / backuppurge-1.0.7-py3-none-any.whl

Download URL backuppurge-1.0.7-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f3cb64410b7f838b7400b8b4b4bef9e61ccc644dcb412efb90fee96818e0e26
BLAKE2b-256 checksum
How to use checksums
4459023d04dab02e19fd457d20452cb7c9623031aea76af83e515f762250737e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for backuppurge 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page