JAEN

SQL

pg_dump / pg_restore

CautionPostgreSQL dump/restore

pg_dump -U <user> -Fc <db> > db.dump

Postgres logical backups; the -Fc custom format enables selective and parallel restores.

Examples

  • pg_restore -U postgres -d app_db -t users db.dumpRestore just one table

Syntax

pg_dump -U u [-Fc] db > file / pg_restore -U u -d db file

Before you run it

Triple-check the restore target.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store