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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store