Page tree

Versions Compared


  • 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
    //for example:

    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



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