diff --git a/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt b/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt index e465048..1119890 100644 --- a/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt +++ b/aws-missing-tools-resources/QA/ec2-automate-backup/ec2-automate-backup-Test-Plan.txt @@ -19,6 +19,10 @@ $ec2ab_exec -v "$volume_1_id $volume_2_id" $ec2ab_exec -v "$volume_1_id $volume_2_id" -n #expected result - snapshot only taken of volume_1 and volume_2 each with tag "name" set to ec2ab_$volume_id_$date_current # +#test backing up only EBS volume with IDs "x" and "y" and tagging them with "user tags" +$ec2ab_exec -v "$volume_1_id $volume_2_id" -u +#expected result - snapshot only taken of volume_1 and volume_2 each with tag "user tags" set to Volume=$ebs_selected and Created=$current_date +# #test backing up only EBS volume with IDs "x" and "y" and tagging them with a tag "PurgeAfter=14" $ec2ab_exec -v "$volume_1_id $volume_2_id" -k 14 #expected result - snapshot only taken of volume_1 and volume_2 each with tags "PurgeAfter=$date_current+14" and "PurgeAllow=true" diff --git a/ec2-automate-backup/ec2-automate-backup.sh b/ec2-automate-backup/ec2-automate-backup.sh index 2951387..6c61276 100755 --- a/ec2-automate-backup/ec2-automate-backup.sh +++ b/ec2-automate-backup/ec2-automate-backup.sh @@ -65,7 +65,7 @@ create_EBS_Snapshot_Tags() #if $user_tags is true, then append Volume=$ebs_selected and Created=$current_date to the variable $snapshot_tags if $user_tags then - snapshot_tags="$snapshot_tags --tag Volume=${ebs_selected} --tag Created=$current_date" + 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