Versions Compared

Key

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

...

After opening the file, look for this section:

 

Code Block
<!-- Current -->
<property name="connection.driver_class">NHibernate.Driver.NpgsqlDriver</property>
<property name="dialect">NHibernate.Dialect.PostgreSQL82Dialect</property>
<property name="connection.connection_string">Server=127.0.0.1;Port=9001;Database=ContinuaCI;User Id=postgres;Password=dsf99EDF983245LJfsdf;MinPoolSize=10;MaxPoolSize=256</property>

The last line contains all the information you need to connect to backup/restore the database.

...

  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 %APPDATA%\postgresql\pgpass.conf (where %APPDATA% refers to the Application Data subdirectory in the user's profile)
    This method is considered most secure as you can set permissions on the file.

 

Restoring

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

When pg_dump was executed, the -F p option was given. This means the backup file contains a list of sql commands with the data requires to re-create your database. To restore this type of backup file you need to use the psql.exe command. The default location of this file is: C:\Program Files\VSoft Technologies\ContinuaCI\Server\PostgreSQL\bin.

 

 

C:\Program Files\VSoft Technologies\ContinuaCI\Server\PostgreSQL\bin>psql -h loc
alhost -p 9001 -U postgres ContinuaCI < \\Hercules\C$\PGBACKUP\PGBACKUP_06112012
1009.bak