Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. After executing the command, you will be prompted for the password which you will be able to type in at the command line.
  2. pg_dump will look for the environment variable PGPASSWORD. If you store the database password here, pg_dump will use it. This method isn't recommended as it's the least secure.
  3. Store the password in pgpass.conf. The location of this file is C:\Users\<user_name>\AppData\Roaming\postgresql\pgpass.conf. This .conf file should take the following format:

    Code Block
    <host_name>:<port>:<database>:<username>:<password>
     
    //for example:
    localhost:9001:*:postgres:password


    This method is considered most secure as you can set permissions on the file. More information on the pgpass.conf file can be found at http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html

 

Restoring

Make sure you've read Some information you will need and Backing up before proceeding.

...