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 username
  4. >password
To restore, execute:
  1. >psql -U username -f dump_username.dump database
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

java 8054460935924309660

Post a Comment

item