One-liner: Destroy all Heroku Postgres Backups
heroku pgbackups
output looks something like this:
ID Backup Time Status Size Database
---- ------------------------- ------------------------------------ ------ ------------------------------------------
b369 2013/09/02 00:12.19 +0000 Finished @ 2013/09/02 00:12.50 +0000 46.1MB HEROKU_POSTGRESQL_BROWN_URL (DATABASE_URL)
You can delete every backup, with this one-liner:
heroku pgbackups --app <app-name> | sed -e '1,2d' | awk '{print $1}' | xargs heroku pgbackups:destroy --app <app-name>
Written by James Martin
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Heroku
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#