no

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 -...

To create a postgresql dump in linux, execute the following commands:

  1. Login as root user
  2. >su - postgres
  3. >pg_dump -U username -W -Z 9 -f /tmp/dump_username.dump.zip -h 127.0.0.1 dbname
  4. >password
To restore, execute:
  1. >psql -U username -f dump_username.dump dbname
Other ways:
>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>

Related

rdbms 8054460935924309660

Post a Comment Default Comments

Outsourcing

Are you looking for freelancers in the Philippines? Get in touch.

Donations

If you like what I do, you can support this channel by buying me a coffee. I would be grateful for your contribution! Your donations will help me create more FREE online courses and learning materials for programmers and remote workers.

item