Skip to content

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.

License

Notifications You must be signed in to change notification settings

kylejginavan/heroku_clonedb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages