Nice tip!
You just reminded me of one more. If you have a big database you can save some time:
pg_dump -Fc | pg_restore
pg_dump -Fc DB_NAME -f DUMP_FILE.gz && pg_restore -d TARGET_DB -j NUM_CORES DUMP_FILE.gz
or
pg_dump -Fd DB_NAME DUMP_FOLDER && pg_restore -d TARGET_DB -j NUM_CORES DUMP_FOLDER
pg_dump -Fd -j NUM_CORES DB_NAME -f DUMP_FOLDER && pg_restore -d TARGET_DB -j NUM_CORES DUMP_FOLDER
Hope it helps :D
Thx, nice to know it.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice tip!
You just reminded me of one more. If you have a big database you can save some time:
pg_dump -Fc | pg_restore(instead of using SQL which is the default)or
Hope it helps :D
Thx, nice to know it.