Backup commands
- pg_dump db_name > db_backup.sql
- pg_dumpall > cluster_backup.sql
Restore commands
- psql db_name < db_backup.sql
- psql -f cluster_backup.sql postgres
Using compression
- pg_dump db_name | gzip > db_backup.gz
- pg_dumpall | gzip > cluster_backup.gz
Restore
- gunzip -c db_backup.gz | psql db_name
- gunzip -c cluster_backup.gz | psql postgres
reference:
https://www.rubytreesoftware.com/resources/basic-postgresql-backup-and-restore/
Subscribe to:
Post Comments (Atom)
free online comma separating tool
https://delim.co/#
-
In my current company, I'm using Visual Paradigm for my documentation task. If you go there site, you can either download community and ...
-
One of the functionality in our system is can able to generate a report using Jasper report. We have a Jasper server setup in another ip ad...
-
This issue happens when I installed Postgres in my vagrant (vm) and then I after a while I removed it. But the service is still running in t...
No comments:
Post a Comment