> ## Documentation Index
> Fetch the complete documentation index at: https://forest-chore-open-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Populate a postgreSQL database on Heroku

> Learn how to populate a remote postgreSQL database on Heroku from an existing database dump.

<Info>
  If you don't have a Heroku application yet, take a look at [this how-to](/legacy/javascript-agents/how-tos/setup/deploy-to-production-on-heroku).
</Info>

We recommend adding on your Heroku application the free add-on “Heroku Postgres” **(1)(2)**.

<img src="https://mintcdn.com/forest-chore-open-api/DwOJ-XBdKEod-4Pc/images/legacy/javascript-agents/deploy%20heroku%204.png?fit=max&auto=format&n=DwOJ-XBdKEod-4Pc&q=85&s=dd38d00fe4ba993b1e9be1d4d757c042" alt="" width="1414" height="1072" data-path="images/legacy/javascript-agents/deploy heroku 4.png" />

Once installed, your Heroku application will contain an environment variable `DATABASE_URL` with the credentials of your new created database **(1)** in the “Config Vars” section **(2)**. Here you can add more if necessary **(3)**.

<img src="https://mintcdn.com/forest-chore-open-api/DwOJ-XBdKEod-4Pc/images/legacy/javascript-agents/deploy%20heroku%205.png?fit=max&auto=format&n=DwOJ-XBdKEod-4Pc&q=85&s=a6ccc7fc033128e3bc10e856e76ec4cf" alt="" width="1414" height="1321" data-path="images/legacy/javascript-agents/deploy heroku 5.png" />

Your new database has no data yet, so you will need to import your local data to this new one.&#x20;

To do that, you first need to create a dump of your local database.&#x20;

```
PGPASSWORD=secret pg_dump -h localhost -p 5416 -U forest forest_demo --no-owner --no-acl -f database.dump
```

Then, you need to import it to the Heroku database.

```
heroku pg:psql DATABASE_URL --app name_of_your_app < database.dump
```

At this stage, your Heroku application is entirely running with its own database. &#x20;

<Check>
  That's it! Your local database is now available as your **production database** on Heroku. 🎉
</Check>

N.B: You can make sure by checking the Heroku logs using the command :

```
heroku logs -t -a name_of_your_app
```
