Skip to content

Instantly share code, notes, and snippets.

@erikgall
Created December 17, 2021 07:18
Show Gist options
  • Save erikgall/fc9ab4ed200ef8fc20e98fe50dabbc86 to your computer and use it in GitHub Desktop.
Save erikgall/fc9ab4ed200ef8fc20e98fe50dabbc86 to your computer and use it in GitHub Desktop.

PostgreSQL Restore using Parallel Jobs

pg_restore -a -e -v --jobs=8 --use-list=toc.dat -d db_name -h 127.0.0.1
  • -a, --data-only - restore only the data, no schema
  • -e, --exit-on-error - exit on error, default is to continue
  • -v, --verbose - verbose mode
  • -j, --jobs=NUM - use this many parallel jobs to restore
  • -L, --use-list=FILENAME - use table of contents from this file for selecting/ordering output
  • -d, --dbname=NAME - connect to database name
  • -h, --host=HOSTNAME - database server host or socket directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment