Name: forkbak
Owner: Rainforest QA
Description: null
Created: 2016-06-23 23:12:57.0
Updated: 2016-06-23 23:12:58.0
Pushed: 2015-10-29 00:05:28.0
Homepage: null
Size: 269
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Creates backups of a recent fork of your primary Heroku Postgres database.
Assuming the app you want to take backups from is called myapp
, this will
take backups from a fork of DATABASE_URL
on myapp
rt APP=myapp
clone git@github.com:hgmnz/forkbak.git
orkbak
ku create $APP-backups
ku addons:add pgbackups --app $APP-backups
ku addons:add scheduler --app $APP-backups
ku config:set APP=$APP-backups \
RK_FROM_APP=$APP \
ROKU_API_KEY=$(heroku auth:token) \
app $APP-backups
push heroku master
Finally, set up a scheduled job to kick off the process every night:
ku addons:open scheduler --app $APP-backups
Use the following values:
Settings | Value
——— | ———————-
Task | bundle exec bin/run
Dyno size | 1X
Frequency | Daily
Note: It is best to create a special user account for this process, and use
it's API key in the HEROKU_API_KEY
config var.
Recommended: Add a logging addon to $APP.
ku run bundle exec bin/run --app $APP-backups
forkbak is copyright (c) Harold Giménez and is released under the terms of the MIT License found in the LICENSE file.