https://github.com/toddlers/ebs-snapshots
ebs snapshot automation
https://github.com/toddlers/ebs-snapshots
Last synced: 3 months ago
JSON representation
ebs snapshot automation
- Host: GitHub
- URL: https://github.com/toddlers/ebs-snapshots
- Owner: toddlers
- Created: 2014-04-20T00:39:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-15T12:54:30.000Z (about 10 years ago)
- Last Synced: 2023-08-03T00:01:45.968Z (almost 2 years ago)
- Language: Ruby
- Size: 172 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
EBS-Snapshot and Rotation
==============## Tasks
1. Taking EBS timely snapshots
2. Deleting them based on the age
3. Tag them appropriately
4. Do a dry run## SYNOPSIS
ebs_snapshot.rb -c config.yaml --dry```
λ: ruby ebs_snapshot.rb --help
Usage: ebs_snapshot.rb [options]-c, --config CONFIG read the options from file
--dry do a dry run and dont do anything
-h, --help show this message
λ:```
## Example config
```
# AWS credentials
provider: 'aws'
aws_access_key_id: ''
aws_secret_key: ''
aws_region: ''# specify the volumes
volumes:
:
:lifetime: ""
:host: ""
:type: ""
# Example
vol-ebb71aa7:
:lifetime: 1
:host: "blah.foo.com"
:type: "hourly" # you can specify daily as well
```
- Two types of lifetime daily and hourly
- if snapshot type is daily ,then lifetime is considered in days
- if snapshot type is hourly ,then lifetime is considered in hours.## Example Runs
```
λ: ruby ebs_snapshot.rb -c config.yamlCreating snapshots 2014-04-20 23:27:10 +0530
Snapshot created Successfully
Checking snapshot es01p:hourly:2014-04-20:23:27
Checking snapshot es02p:daily:2014-04-20:23:27
Checking snapshot es02p:daily:2014-04-19:12:41
Checking snapshot es01p:hourly:2014-04-19:12:41
deleteing snapshot snap-1c4878c0
Deleted old snapshots```
```
λ: ruby ebs_snapshot.rb -c config.yaml --dryBelow are the volumes id for snapshots
vol-ebb71aa7,vol-826fccceChecking snapshot es01p:hourly:2014-04-20:23:27
Checking snapshot es02p:daily:2014-04-20:23:27
Checking snapshot es02p:daily:2014-04-19:12:41
Nothing to delete
```
## Dependencies
- ruby
- fog