Versions Compared

Key

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

...

Option 
-h

'127.0.0.1' if you're on the same machine as the Continua database server

-p9001 is the default port we use when installing Continua.
-Upostgres is the default username when installing Continua
-F pThis outputs the database in plain text which equates to SQL commands
-f <backup_filename>The full path and file name where the database backup will be written to.
<database_name>The final

...

option is the database name which is ContinuaCI by default.

  is ContinuaCI.

The final command then will look something like this:

...

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.

The options to use when restoring a database with psql are:

 

 

Option 
-h

'127.0.0.1' if you're on the same machine as the Continua database server

-p9001 is the default port we use when installing Continua.
-Upostgres is the default username when installing Continua
<database_name>Usually ContinuaCI by default.
<backup_file>Full path and file name of the file created from running pg_dump.exe

Using the information gathered from the Continua.Server.Service.exe.config file, the restore command will look something like this:

Code Block
psql.exe -h localhost -p 9001 -U postgres ContinuaCI < C:\continua_backup.bak

The password requires are the same as pg_dump. Please make sure you read the Backing up the ContinuaCI database section for ways to managing the input of the password.

Note: When restoring the database, take note that you specify the database name. You will either need to delete the old ContinuaCI database then restore it, or restore it to a different name. If you restore it to a different name you can then rename the old ContinuaCI database, then rename the newly restored to ContinuaCI. Alternatively, you can restore it to any name you like then modify the Continua.Server.Service.exe.config file's Database= property to your new database name. That way you're able to start the ContinuaCI server with the new database before and switch back to the old one if you need to.

 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