Skip to main content

Automatic backup management of AWS EC2 EBS volumes

Project description

Automated EBS Snapshots helps you ensure that you have up to date snapshots of your EBS volumes.

All you need to do to get started is documented below.

Installation

pip install automated-ebs-snapshots

Authentication configuration

Automated EBS snapshots can be configured either via command line options or via command line options.

Command line options

You can use the following command line options to authenticate to AWS.

AWS configuration options:
  --access-key-id ACCESS_KEY_ID
                        AWS access key
  --secret-access-key SECRET_ACCESS_KEY
                        AWS secret access key
  --region REGION       AWS region

Configuration file

Create a configuration file anywhere on you file system.

[general]
access-key-id: xxxx
secret-access-key: xxxxxxxx
region: eu-west-1

Then use the --config command line option to point at your configuration file.

Watching and unwatching volumes

Start watching a volume

In order to enable automatic snapshots, you need to start watching the volume. The following command will add vol-13245678 to the watchlist with snapshots created daily.

automated-ebs-snapshots --config ~/auto-ebs-snapshots.conf --watch vol-12345678 --interval daily

List watched volumes

List the currently watched volumes and their backup interval

automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --list

Stop watching a volume

To stop creating automated backups for a volume, run this:

automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --unwatch vol-12345678

Creating snapshots

Now, to start taking snapshots you will need to have Automated EBS Snapshots running.

automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --run

It will check if there are any volumes with no or too old snapshots. New snapshots will be created if needed.

There is no daemon mode currently, so you will need to run something like this.

nohup while true ; do automated-ebs-snapshots --config ~/automated-ebs-snapshots.conf --run >> /var/log/automated-ebs-snapshots.log 2>&1 ; sleep 600 ; done

Author

This project is maintained by Sebastian Dahlgren and it is supported by Skymill Solutions.

License

APACHE LICENSE 2.0 Copyright 2014 Skymill Solutions

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

automated-ebs-snapshots-0.1.0.tar.gz (15.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page