Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

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’]( 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

## 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. bucket prefix file.

See python -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.

Filename, size & hash SHA256 hash help File type Python version Upload date (4.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page