Difference between revisions of "Postgres Backup & Restore"
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
pg_restore | pg_restore | ||
``` | ``` | ||
+ | |||
+ | https://stackoverflow.com/questions/2732474/restore-a-postgres-backup-file-using-the-command-line |
Revision as of 22:17, 9 April 2022
.env
export PGPASSWORD=mypass export PGUSER=admin export PGDATABASE=mydb export PGHOST=myhostorip
nohup pg_dump -Fc $DB > $DB-$(date +%d-%m-%y_%H-%M).pgdumpFc pg_restore
https://stackoverflow.com/questions/2732474/restore-a-postgres-backup-file-using-the-command-line