Giter VIP home page Giter VIP logo

backup-monkey's People

Contributors

excessivedemon avatar pas256 avatar pdcoxhead avatar virako avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

backup-monkey's Issues

Tag Issue

While tagging the snapshot , It uses a prefix BACKUP_MONKEY..which is kind of confusing while searching from a large number of snapshots. we need to run graffiti_monkey after backup monkey finishes its task..

Install crashes

I have Python 2.7 on an OpenSUSE 13.2 machine. I've already installed boto3. Here's what happens when I install backup-monkey:

www2:/srv/www/htdocs/resv # sudo pip install backup-monkey
Downloading/unpacking backup-monkey
Downloading backup_monkey-1.0.0.tar.gz
Running setup.py (path:/tmp/pip_build_root/backup-monkey/setup.py) egg_info for package backup-monkey
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip_build_root/backup-monkey/setup.py", line 23
print 'Backup Monkey requires Python 2.7.x'
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip_build_root/backup-monkey/setup.py", line 23

print 'Backup Monkey requires Python 2.7.x'

                                          ^

SyntaxError: invalid syntax


Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/backup-monkey
Storing debug log for failure in /root/.pip/pip.log

Exclude option

Any chance that you'd consider adding an exclude option? I have many resources in our AWS accounts and need to limit what is being snapped automatically by backup monkey. Being able to point it to a txt file containing ebs id's to exclude would be extremely helpful.

thanks

Filtering resources (with --tag) with --remove-only option

Hi, if I have understood right the --tag (or --reverse) applies only when I want to add snapshots.
I think it would be useful using --tag when you want to purge old snapshots.
In the case that you take the snapshot with a custom script (because, for example, you want a snapshot in a consistent state, freezing someway the application ) you could then use a command like this

backup-monkey-master$ backup-monkey --region xxx --max-snapshots-per-volume 14 --remove-only --tags MyTag:MyVal

To keep at most 14 snapshots on the snapshots given tag

Regards.
F

PS In any case, the manual says:
--tags TAGS [TAGS ...]
But the following description says --tag :
Only snapshot instances that match passed in tags.
E.g. --tag Name:foo will snapshot all instances with a
tag Name and value is foo

InvalidSnapshot.InUse - Snap inuse on AMI

I was running the cleanup process and then was hit with this following error -- any ideas of how to get around this?

Deleting snap-9a471c8f: BACKUP_MONKEY vol-a7444947 i-8b77965c /dev/xvda
Traceback (most recent call last):
File "/usr/local/bin/backup-monkey", line 9, in
load_entry_point('backup-monkey==1.0.0', 'console_scripts', 'backup-monkey')()
File "/usr/local/lib/python2.7/dist-packages/backup_monkey/cli.py", line 75, in run
monkey.remove_old_snapshots()
File "/usr/local/lib/python2.7/dist-packages/backup_monkey/core.py", line 88, in remove_old_snapshots
snapshot.delete()
File "/usr/local/lib/python2.7/dist-packages/boto/ec2/snapshot.py", line 112, in delete
return self.connection.delete_snapshot(self.id, dry_run=dry_run)
File "/usr/local/lib/python2.7/dist-packages/boto/ec2/connection.py", line 2518, in delete_snapshot
return self.get_status('DeleteSnapshot', params, verb='POST')
File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1227, in get_status
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request

InvalidSnapshot.InUseThe snapshot snap-9a471c8f is currently in use by ami-4bc0cf215a68a803-2194-4454-b1c1-18005583e2

Backup Monkey not effective as cron job, but fine manually

Hi,

Thanks for backup monkey!

I have an Ubuntu 12.04.2 server that I'm running backup monkey 1.0.0 (via pip) from. I use the command:

backup-monkey --max-snapshots-per-volume 14 --snapshot-only -v >> /var/log/backup_monkey.log

When run manually, this works great (with the caveat that backup monkey provides neither stdout nor stderr, so the log remains empty). Running crontab -l confirms that this line is in root's crontab:

0 4 * * * backup-monkey --max-snapshots-per-volume 14 --snapshot-only -v >> /var/log/backup_monkey.log

Checking /var/log/syslog confirms that cron has been running this job. However, EBS snapshots only appear when the command is run manually, never when the cron job runs.

What could be the cause of (or solution to) this?

Thanks,
Andy

--tag does not work as expected

Hi @pas256 !

while help message says:

 --tags TAGS [TAGS ...]
                        Only snapshot instances that match passed in tags.
                        E.g. --tag Name:foo will snapshot all instances with a
                        tag `Name` and value is `foo

the script is running DescribeVolumes action, expecting EBS volumes to have tags, rather than EC2 instances.
Is that expected behaviour ?

backup-monkey crashes when the Request limit is reached

When creating or deleting a lot of snapshots backup-monkey crashes when the requests to AWS fail because the request limit is reached.

It should catch the error and try again with a lower rate.

`Traceback (most recent call last):
File "/usr/local/bin/backup-monkey", line 9, in
load_entry_point('backup-monkey==1.0.0', 'console_scripts', 'backup-monkey')()
File "/usr/local/lib/python2.7/dist-packages/backup_monkey-1.0.0-py2.7.egg/backup_monkey/cli.py", line 103, in run
monkey.remove_old_snapshots()
File "/usr/local/lib/python2.7/dist-packages/backup_monkey-1.0.0-py2.7.egg/backup_monkey/core.py", line 150, in remove_old_snapshots
snapshot.delete()
File "/usr/local/lib/python2.7/dist-packages/boto-2.38.0-py2.7.egg/boto/ec2/snapshot.py", line 97, in delete
return self.connection.delete_snapshot(self.id, dry_run=dry_run)
File "/usr/local/lib/python2.7/dist-packages/boto-2.38.0-py2.7.egg/boto/ec2/connection.py", line 2501, in delete_snapshot
return self.get_status('DeleteSnapshot', params, verb='POST')
File "/usr/local/lib/python2.7/dist-packages/boto-2.38.0-py2.7.egg/boto/connection.py", line 1213, in get_status
response = self.make_request(action, params, path, verb)
File "/usr/local/lib/python2.7/dist-packages/boto-2.38.0-py2.7.egg/boto/connection.py", line 1116, in make_request
return self._mexe(http_request)
File "/usr/local/lib/python2.7/dist-packages/boto-2.38.0-py2.7.egg/boto/connection.py", line 1028, in _mexe
raise BotoServerError(response.status, response.reason, body)
boto.exception.BotoServerError: BotoServerError: 503 Service Unavailable

RequestLimitExceededRequest limit exceeded.7fba627b-7ab4-4b1f-85a4-cde7193d086b
`

Traceback Error

Hi Peter,

I encounter some trackback call while trying to run backup-monkey on version 1.0.0. The error are as follow:
[ec2-user@tappawsl001 backup_monkey-1.0.0]$ backup-monkey
2013-12-10 07:30:41 [INFO] Connecting to region ap-southeast-2
Traceback (most recent call last):
File "/usr/local/bin/backup-monkey", line 9, in
load_entry_point('backup-monkey==1.0.0', 'console_scripts', 'backup-monkey')()
File "/usr/local/lib/python2.7/site-packages/backup_monkey-1.0.0-py2.7.egg/backup_monkey/cli.py", line 70, in run
monkey = BackupMonkey(region, args.max_snapshots_per_volume)
File "/usr/local/lib/python2.7/site-packages/backup_monkey-1.0.0-py2.7.egg/backup_monkey/core.py", line 36, in init
log.error('Could not connect to region %s' % self._ami_region)
AttributeError: 'BackupMonkey' object has no attribute '_ami_region'

I'm quite new with python script so not sure how to troubleshoot it.

Please advice.

Thanks.

Regards,
YT

Add filtering

Add a way to filter which EBS volumes and snapshots Backup Monkey operates on. This could be useful to only snapshotting a subset of your volumes, rather than all of them.

The only filter I can think right now is by Tag key/value pairs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.