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

item