Welcome to AWS Boto Scripts Page.
This repo contains scripts written in Python using boto that are useful in managing an AWS account. Feel free to pitch in.
backup-manager a folder in this repo, contains two scripts (createImagesBasedOnTags.py and deleteBackupsBasedOnTags) that are used for managing backups for an AWS account.
- createImagesBasedOnTags.py - It creates an image (ami) of all the instances that have tag "AutomaticBackup" with value "True"
{"AutomaticBackup":"True"}
. One can also specify another tag "Frequency", which counts the number of ami required for an instance. - Frequency tag is helpful when you need to create more than one backup in a day, for that you will also need to run this script more than once according to the frequency that you need.
- It also tags the resultant ami with following tags
{"instance_id":"<actual-instance-id>"}
(helps in searching). - deleteBackupsBasedOnTags-backupManager.py - It deletes the older images if the instances which have tag
{"AutomaticBackup":"True"}
. By default it deletes images older than 30 days. This number can be customized by by another tag "RetentionCount"{"RetentionCount":45}
.
Authors and Contributors
Hitesh Bhatia (@hiteshBhatia) Vikash Jha (@91vikash) Aakash Garg (@aakash21)