Talk Nerdy To Me: Amazon EC2 backup pruning script
Update: here’s a text version without smartquotes. Download it, change the extension to .sh, and enjoy.
Update 2: this is now on Github, go there instead
As a followup to this previous post - a script that automates EBS snapshots on an Amazon EC2 server - here’s a bash script to prune the EC2 snapshots created by the other script.
#!/bin/bash
export EC2_PRIVATE_KEY={path to your AWS private key} export EC2_CERT={path to your AWS certificate} export JAVA_HOME=/usr/lib/jvm/jre