Skip to content

Latest commit

 

History

History
56 lines (29 loc) · 1.36 KB

README.rdoc

File metadata and controls

56 lines (29 loc) · 1.36 KB

Heroku CloneDB Plugin

Use this plugin to properly clone a PostgreSQL database from Heroku to localhost. The main difference between this plugin and db:pull is that foreign keys and other db constraints are handled properly.

Installation

After that, a simple

$ heroku plugins:install [email protected]:chebyte/heroku_clonedb.git

will get you up and running.

If you are using HeroCutter for install your plugins for heroku, you can do this:

$ heroku plugins:install git://github.com/hone/heroku_herocutter.git

and finally

$ heroku plugins:install clonedb

Usage

From your project’s root directory:

For load a data dump from heroku app to localhost:

$ heroku clonedb --from app_name

If you want before load data dump from heroku, drop and create the db again, you can use:

$ heroku clonedb --from app_name --drop

For transfer data from one app to another:

$ heroku clonedb --from app_name1 --to app_name2

For transfer data from url dump to heroku app:

$ heroku clonedb --from-url 'http://s3.amazonaws.com/.....mydb.dump?authparameters' --to app_name

For get a data dump from heroku app:

$ heroku clonedb --dump --from app_name [--dir <dir_path>]

And this is all :)

Authors:

TODO:

Please contact me if there is any enhancements you would like to this project.