Database Reference
In-Depth Information
Importing databases
You can use the PG Backups add-on to import database dumps from other databases to
your Heroku Postgres database. This can be done using the pgbackups:restore com-
mand through a dump database generated by the pg_dump tool.
Note
If your environment is Windows, you must first create the variables that indicate the user
and password of PostgreSQL locally. For working on Windows, execute the following
commands in the Command Prompt:
SET PGUSER=your_postgres_username_locally
SET PGPASSWORD=your_postgres_password_locally
The pg_dump tool is present by default in the PostgreSQL installation on your computer
or other web servers. To generate a new dump, you must enter this command for Linux and
Mac OS X:
$ PGPASSWORD=your-db-password pg_dump -Fc --no-acl
--no-owner -h localhost -U your-db-username
your-database-name > mydb.dump
For Window users, enter the following command:
$ pg_dump -Fc --no-acl --no-owner -h localhost -U
your-db-username your-database-name > mydb.dump
Search WWH ::




Custom Search