Download of backup copy
Good afternoon, community. Can you please tell me if I can download a backup copy of the database? Tell me how to do this.
8 Replies
ratty-blush•2y ago
You can use pg_dump to dump a backup of your database, as mentioned here:
https://neon.tech/docs/manage/backups
pg_dump instructions:
https://neon.tech/docs/import/import-from-postgres#export-data-with-pgdump
Neon
Backups - Neon Docs
Neon does not yet provide support for configuring automated backups in the Neon Console or API. This feature is on our roadmap. You can expect it to be introduced in the coming months. In the meantime...
Neon
Import data from Postgres - Neon Docs
This topic describes migrating data from another Postgres database to Neon using the pg_dump and pg_restore command line utilities. Avoid using pg_dump over a pooled connection string (see PgBouncer i...
equal-aquaOP•2y ago
Thanks for providing the link to the documentation. Even though I followed it, I get an error about a syntax error. Here is the line I enter (the password is hidden, but I enter it into the terminal):
pg_dump -Fc -v -d postgresql://mafri.michel:*@ep-twilight-dream-a263uf1b.eu-central-1.aws.neon.tech/mppdb?sslmode=require -f mydumpfile.bak
Where exactly did I go wrong?
ratty-blush•2y ago
Hi, can you paste the error?
The sslmode=require might be the issue. This works for me:
pg_dump -Fc -v -d postgres://neondb_owner:password@ep-empty-water-a5h4fla4.us-east-2.aws.neon.tech/neondb -f mydumpfile.bak
To run with sslmode=require, you can use an environment variable like this:
PGSSLMODE=require pg_dump -Fc -v -d postgres://neondb_owner:password@ep-empty-water-a5h4fla4.us-east-2.aws.neon.tech/neondb -f mydumpfile.bak
equal-aquaOP•2y ago


ratty-blush•2y ago
OK. I see. You have to run pg_dump from a command line where you have that utility installed. It's a PostgreSQL utility. You should be able to find installation instructions for your operating system online. It's included with a local Postgres installation. Thanks for pointing this out. It's a gap in our docs.
equal-aquaOP•2y ago
Do I understand correctly that I need to download the client PostgreSQL to my OS and make a dump through it?
ratty-blush•2y ago
Right. A local Postgres installation will include the pg_dump utility among many others like psql, pg_restore, etc. There may be separate Postgres client packages available for your operating system that would allow you to avoid installing a full Postgres installation, but installing Postgres will provide you with the pg_dump utility.
equal-aquaOP•2y ago
Thank you for your prompt response.