Backup your files to Amazon Web Services in a way that slowly forgets! I’ve learned that this way is refered to as the [‘Grandfather, father, son’](http://en.wikipedia.org/wiki/Backup_rotation_scheme#Grandfather-father-son) strategy.
This script copies a file to Amazon S3 and rotates it.
The filename will have a date stamp added before the first . in the filename. Do not add a timestamp yourself, this will cause the script to treat the file as a unique file and the rotation won’t work!
Rotation works as follows: - Keep files from the last X days - After that, keep Y files spaced at least a week apart - After that, keep Z files spaced at least 30 days apart
## Installation
pip install s3-backup-rotate
## Usage
Export the following environment variables: - export AWS_ACCESS_KEY_ID=yourkeyidhere - export AWS_SECRET_ACCESS_KEY=yoursecretkey
You can also use one of the other methods supported by boto.
upload_rotate.py bucket prefix file.
See python upload_rotate.py -h for more info.
## Development
### Buidling Pypi package
python setup.py sdist twine upload dist/s3-backup-rotate-
Metadata
Release files for s3-backup-rotate 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| s3-backup-rotate-0.3.3.tar.gz | 5.0 kB | Without provenance | Details for s3-backup-rotate-0.3.3.tar.gz |
Release files / s3-backup-rotate-0.3.3.tar.gz
| Download URL | s3-backup-rotate-0.3.3.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
772e786ea27573f3958f21002534d435bf588ecc1275badd3bb2eeb92ad83235
|
|
BLAKE2b-256 checksum How to use checksums |
ee7671d88a87124959a54a8579ed1de9ab772c3b63b9548d3d0ae111f42b6098
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for s3-backup-rotate 0.3.3
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.