cloudavail / aws-missing-tools

tools for managing AWS resources including EC2, EBS, RDS, IAM, CloudFormation and Route53.
1.34k stars 406 forks source link

purge option #116

Open kanandaraj opened 8 years ago

kanandaraj commented 8 years ago

purge option seems not working. I tried following way ec2-automate-backup.sh -v "vol-6d6a0527 vol-636a0112" -p ec2-automate-backup.sh -v "vol-6d6a0527 vol-636a0112" -k 10 -r "us-west-2" -n "data" -p 10

davfox commented 8 years ago

Did the PurgeAfterFE and PurgeAllow tags get set on the snapshots that were created? What get's output by the script when it's run?

Or perhaps you already got it working?

I've just started using this script but will need to see if purge is working for me after a couple of days have passed.

kanandaraj commented 8 years ago

PurgeAfterFE and PurgeAllow tags were created successfully. -p option only not working. on line number 151,purge_snapshots=false change this to true. I made it to work this way and did not use -p .

jppunnett commented 8 years ago

Hi kanandaraj,

In your second cmd, try removing the 10 after the -p flag. Also remove the "data" after -n flag. (The -p and -n flags do not take parameters.) Here is the changed cmd:

ec2-automate-backup.sh -v "vol-6d6a0527 vol-636a0112" -k 10 -r "us-west-2" -n -p`

bigtamo commented 8 years ago

hi

was trying the script and changed line 151 to purge_snapshots=true; are there any areas to edit in the script?

./ec2-automate-backup.sh -v vol-0f9e8ce6 -k 7 -n -p >> /var/log/aws.log 2>&1

this is my script output :>>

Tagging Snapshot snap-edeb7ffc with the following Tags: Key=CreatedBy,Value=ec2-automate-backup Key=Name,Value=DailyBkUp_vol-0f9e8ce 6_10-05-2016-14-46-32 Key=PurgeAfterFE,Value=1463467592 Key=PurgeAllow,Value=true Snapshot Purging is Starting Now.

however i noticed the purging option is not working and the timestamp is in epoch.

thanks, would love any help or guidance.

Update purge option is working now BUT it purge away all the old snapshots including the current snapshot its creating.

Please kindly assist. Thanks.