This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set AWS_EC2_COMMAND=aws ec2 --dryrun | |
set AWS_HOME=. | |
set AWS_VOLUME=vol-12345678 | |
set AWS_SNAPSHOT_KEEP=10 | |
set VOL_DESC=Daily Snapshot | |
:: Create snapshot for this volume | |
CMD /C %AWS_EC2_COMMAND% create-snapshot %AWS_VOLUME% -d "%VOL_DESC%" | |
:: Find old snapshots for this volume, sort them by date desc |