diff --git a/aws-missing-tools-resources/.DS_Store b/aws-missing-tools-resources/.DS_Store new file mode 100644 index 0000000..4dc8e17 Binary files /dev/null and b/aws-missing-tools-resources/.DS_Store differ diff --git a/aws-missing-tools-resources/QA/.DS_Store b/aws-missing-tools-resources/QA/.DS_Store new file mode 100644 index 0000000..23e1782 Binary files /dev/null and b/aws-missing-tools-resources/QA/.DS_Store differ diff --git a/ec2-automate-backup/.DS_Store b/ec2-automate-backup/.DS_Store new file mode 100644 index 0000000..4250d5d Binary files /dev/null and b/ec2-automate-backup/.DS_Store differ diff --git a/ec2-automate-backup/README.md b/ec2-automate-backup/README.md index c985a1c..fcae2b8 100644 --- a/ec2-automate-backup/README.md +++ b/ec2-automate-backup/README.md @@ -37,10 +37,12 @@ ec2-automate-backup requires one of the following two parameters be provided: * To perform daily backup using cron and to load environment configuration with a "cron-primer" file: - `0 0 * * 0 ec2-user /home/ec2-user/ec2-automate-backup.sh -c /home/ec2-user/cron-primer.sh -s tag -t "Backup=True"` +`-a` - the -a flag will tag snapshots with additional data so that snapshots can be more easily located. Currently the two auto tags created are Volume="ebs_volume" and Created="date" + # Additional Information: -the file "ec2ab - IAM User Required Permissions.json" contains the IAM permissions required to run ec2-cost-calculate.rb in with the least permissions required as of 2012-11-21. +the file "ec2ab - IAM User Required Permissions.json" contains the IAM permissions required to run ec2-automate-backup.sh in with the least permissions required as of 2012-11-21. - Author: Colin Johnson / colin@cloudavail.com -- Date: 2012-12-09 +- Date: 2013-01-27 - Version 0.1 - License Type: GNU GENERAL PUBLIC LICENSE, Version 3 diff --git a/ec2-automate-backup/ec2-automate-backup.sh b/ec2-automate-backup/ec2-automate-backup.sh index 833bba1..7ac4299 100755 --- a/ec2-automate-backup/ec2-automate-backup.sh +++ b/ec2-automate-backup/ec2-automate-backup.sh @@ -1,6 +1,6 @@ #!/bin/bash - # Author: Colin Johnson / colin@cloudavail.com -# Date: 2012-09-24 +# Date: 2013-01-27 # Version 0.1 # License Type: GNU GENERAL PUBLIC LICENSE, Version 3 # @@ -62,12 +62,12 @@ create_EBS_Snapshot_Tags() snapshot_tags="$snapshot_tags --tag PurgeAfter=$purge_after_date --tag PurgeAllow=true" fi + #if $auto_tag is true, then append Volume=$ebs_selected and Created=$date_current to the variable $snapshot_tags if $auto_tag then snapshot_tags="$snapshot_tags --tag Volume=${ebs_selected} --tag Created=$date_current" fi - #if $snapshot_tags is not zero length then set the tag on the snapshot using ec2-create-tags if [[ -n $snapshot_tags ]] then echo "Tagging Snapshot $ec2_snapshot_resource_id with the following Tags:" @@ -156,7 +156,7 @@ date_binary="" #sets the "Name" tag set for a snapshot to false - using "Name" requires that ec2-create-tags be called in addition to ec2-create-snapshot name_tag_create=false -#sets the auto_tagging feature to false - requires same as Name tag, auto sets tags like Volume with volume_id and Created with timestamp for easy searching +#sets the auto_tagging feature to false - auto_tag creates tags on snapshots - by default each snapshot is tagged with volume_id and current_data timestamp auto_tag=false #sets the Purge Snapshot feature to false - this feature will eventually allow the removal of snapshots that have a "PurgeAfter" tag that is earlier than current date purge_snapshots=false