0.0
No commit activity in last 3 years
No release in over 3 years
Some nice rake tasks for Heroku's pgbackups
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.17.0
 Project Readme

Some nice rake tasks for Heroku’s pgbackups¶ ↑

Allows you to do

$ rake pgbackup:seed       # capture pgbackup from production and load into development
$ rake pgbackup:to_staging # capture pgbackup from production and load into staging

Installation¶ ↑

  1. Add pgbackup-tasks to gemfile

    gem 'pgbackup-tasks'
    
  2. Bundle install

    $ bundle
  3. Make sure you’re using postgres for development.

    # config/database.yml
    development:
      adapter: postgresql
      database: myapp_development
      ...
  4. Make your heroku app’s remote names production and staging (as recommended in this heroku help article)

    # git/config
    [remote "production"]
      url = git@heroku.com:myapp.git
    
    [remote "staging"]
      url = git@heroku.com:myapp-staging.git
  5. Make sure you have the pgbackup add-on installed for your heroku apps.

    $ heroku addons:add pgbackups --remote production
    $ heroku addons:add pgbackups --remote staging
  6. Go for it!

    $ bundle exec rake pgbackup:seed

To Do¶ ↑

- add rails 2 support
- check to see that production and staging remotes are set (with nice warning)
- nice output (downloading, saving, restoring)
- hide "private" rake tasks
- silence pg_restore output
- figure out the best place to store backups