Script to rotate backup files on AWS S3 according to a grandfather, father, son strategy.
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file s3-backup-rotate-0.3.0.tar.gz
.
File metadata
- Download URL: s3-backup-rotate-0.3.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60cd0f22ed0d30044049db2d7a9a9cd1784eabc622f5960917ffb4e3ca7648a6 |
|
MD5 | 60dc51716e23ae66f03ffccbd17639ab |
|
BLAKE2b-256 | 6ad35c2699e97c96144caecbb688a8e6d7e9d2c8259ecce5b412dedc0225edbb |
File details
Details for the file s3_backup_rotate-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: s3_backup_rotate-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ee0844bd9fe7e9904573d092b686b6a6f92f1107e582aaf9b0a31cdce979492 |
|
MD5 | 3768d6339eacb9f6262505955ac702e8 |
|
BLAKE2b-256 | 0a3e4594a1ace741795c467d9295698f49d5c03e62748e54d561455439fe5fbe |