Simple postgres database import script for Heroku projects from your pals at Neoteric Design
Current Version: 0.1.1
Just Ruby 😬
Clone repo
git clone [email protected]:neotericdesign/import_db.git
Grant execute privilege
chmod +x import_db/import_db.rb
(Optional, recommended) Symlink the script for easy access, e.g:
ln -s /full/path/to/import_db/import_db.rb /usr/bin/local/import_db
import_db [heroku-app-name] [options]
heroku-app-name
- Specify the heroku app to pull from. Only supports the default postgres database you have set.
- Default: the current directory name. If unset will prompt you before taking action.
-d, --database [DATABASE]
- Specifies local database to dump to
- Default:
herokuappname_development
-l, --live
- Use a live dump of the data, rather than the latest pg:backup
-t, --tables [TABLES]
- Specify which tables to be included in dump.
- Note: This automatically sets
--live
because it's most reliably done with a fresh pg_dump
-v, --version
- Returns script version