Skip to main content

Utility for synchronizing parallel PostgreSQL databases on Heroku, local, and remote servers

Project description

Build status Coverage status Latest PyPI version Supported Python versions Number of PyPI downloads

Utility for synchronizing parallel PostgreSQL databases on Heroku, local, and remote servers

Like my work? Tip me!


Easily copy databases between locations, e.g.:

  • Initialize a Heroku database with local data

  • Update local development database with the latest data in your Heroku app

  • Update one Heroku app (e.g. staging) with the data from another app (e.g. production)


You can get paragres from PyPI with:

pip install paragres

The development version can be installed with:

pip install -e git://

If you are developing locally, your version can be installed from the working directory with:



Note 1: To use paragres to access a Heroku app, you must be logged into the Heroku account that owns that app.

Note 2: By default, Heroku’s new pg:backups command is used. if you want to use the old pgbackups addon, you must specify –use-pgbackups

Example 1, copying data between Heroku databases:

paragres -s <source_heroku_app_name> -d <destination_heroku_app_name>

Example 2, copying a new backup snapshot of data from a Heroku database to localhost:

paragres -s <heroku_app_name> -c -t path/to/

Example 3, creating a backup snapshot of a Heroku database:

paragres -c -s <heroku_app_name> must contain at least the following (Django settings file format):

    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': '<db_name>',
        'USER': '<username>',
        'PASSWORD': '<password>',
        'HOST': '<host>',
        'PORT': '<port>',

Supported transfers:



Heroku app


local file




X *




Heroku app



* Can only push from a database accessible to the local user, or accessible to a user configured via PG* environment variables

Full list of optional arguments:

-h, --help            show this help message and exit
--version             Show program's version number
-f FILE, --file FILE  PostgreSQL dump file to use as a data source
-u URL, --url URL     Public URL from which to pull db file
-s SOURCE_APP, --source-app SOURCE_APP
                      Heroku app from which to pull db
-c, --capture         Capture a new Heroku backup
                      Django-style settings file with database connection information for source database
                      (or 'DJANGO_SETTINGS_MODULE' to use that environment variable's value)
                      Source database name (overrides value in source settings if both are specified)
                      Heroku app for which to replace db
-t SETTINGS, --settings SETTINGS
                      Django-style settings file with database connection information for destination database
                      (or 'DJANGO_SETTINGS_MODULE' to use that environment variable's value)
-n DBNAME, --dbname DBNAME
                      Destination database name (overrides value in settings if both are specified)
                      Verbosity level: 0=minimal output, 1=normal output
--use-pgbackups       Use the deprecated pgbackups addon rather than Heroku pg:backups


Fork the project on github and git clone your fork, e.g.:

git clone<username>/paragres.git

Create a virtualenv and install dependencies:

mkvirtualenv paragres
pip install -r requirements/package.txt -r requirements/test.txt

Run tests with coverage (should be 100%) and check code style:

coverage run -m nose
coverage report -m

Verify all supported Python versions:

pip install tox

Install your local copy:

python install

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paragres-0.6.3.tar.gz (8.5 kB view hashes)

Uploaded source

Built Distribution

paragres-0.6.3-py2-none-any.whl (9.1 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page