Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

No Format
pg_dump -h [hostname] -p [port_number] -U [username] -W [password] [databasename] > [backupfile.sql]

[hostname] - this is your database server host
[port_number] - this is your database server port number
[username] - this is your database username
[password] - this is the password for your database
[databasename] - the name of your RMsis database
[backupfile.sql] - the file to which the backup should be written.

 
You will be prompted to provide the database password.

Restore

The idea behind pg_dump is to generate a text file with SQL commands that, when fed back to the server, will recreate the database in the same state as it was at the time of the dump.The text files created by pg_dump are intended to be read in by the psql program. Following is the general command syntax to restore a dump :

No Format
psql -h [hostname] -p [port_number] -U [username] -W [password] [database_to_restore] < [backupfile.sql]

...