How to Dump and Restore a Postgresql Database
To create a postgresql dump in linux, execute the following commands: Login as root user >su - postgres >pg_dump -U username -W -...
https://www.czetsuyatech.com/2021/07/postgresql-dump-and-restore-a-database.html
To create a postgresql dump in linux, execute the following commands:
- Login as root user
- >su - postgres
- >pg_dump -U username -W -Z 9 -f /tmp/dump_username.dump.zip -h 127.0.0.1 dbname
- >password
To restore, execute:
Other ways:
- >psql -U username -f dump_username.dump dbname
>pg_dump -U <username> -W -Z 9 -f /outfile.dump.zip -h 127.0.0.1 <dbname> ><password> //to restore >psql -U <username> -f <infile> <dbname>
Post a Comment