pg_restore
Backup & RestoreRestore a PostgreSQL database from archive
Options & Flags
Available options for this command
-dDatabase to restore into
-cClean (drop) objects before recreating
-jNumber of parallel jobs
--no-ownerSkip restoration of object ownership
-tRestore specific table only
Examples
Common usage examples
Restore from custom format backup
pg_restore -d mydb backup.dumpClean and restore database
pg_restore -c -d mydb backup.dumpParallel restore with 4 jobs
pg_restore -j 4 -d mydb backup.dumpRestore only users table
pg_restore -t users -d mydb backup.dumpNotes
- Only works with non-plain-text dumps
- For plain SQL, use psql -f instead