def snapshot_rds(): """ dumb script that cleans up all the duplicate ebs snapshots our two cron servers create while backing up redis """ (key, secret) = aws conn = RDSConnection(key, secret) for db in conn.get_all_dbinstances(): print "backing up rds", db.id, "..." now = datetime.datetime.now() conn.create_dbsnapshot("snapshot-backup-{0}".format(now.strftime("%Y-%m-%d")), db.id)
def snapshot_rds(): """ dumb script that cleans up all the duplicate ebs snapshots our two cron servers create while backing up redis """ (key, secret) = aws conn = RDSConnection(key, secret) for db in conn.get_all_dbinstances(): print "backing up rds", db.id, "..." now = datetime.datetime.now() conn.create_dbsnapshot( "snapshot-backup-{0}".format(now.strftime("%Y-%m-%d")), db.id)