User Tools

Site Tools


how_to:restore_a_database_backup

This is an old revision of the document!


Restore a database backup

If you have a valid backup of the PostgreSQL database used by VPOP3, you can restore it by performing the following steps:

VPOP3 v5 or later

  1. Open a command prompt, and go to the VPOP3 directory
  2. If you are restoring the backup over an existing VPOP3 database (especially if the database files are damaged) you will need to DROP the database first.
    1. To do this, run pgsql\bin\dropdb -U postgres -p 5433 vpop3. When it prompts for the password enter the PostgreSQL master password - default pgsqlpass.
  3. Run pgsql\bin\pg_restore -U postgres -C -p 5433 -v -j 4 -d postgres <filename> where <filename> is the database backup you want to restore. When it prompts for a password enter the PostgreSQL master password - default pgsqlpass

VPOP3 v3 or v4

  1. Open a command prompt, and go to the VPOP3 directory
  2. If you are restoring the backup over an existing VPOP3 database (especially if the database files are damaged) you will need to DROP the database first.
    1. To do this, run pgsql\bin\dropdb -U postgres vpop3. When it prompts for the password enter the PostgreSQL master password - default pgsqlpass.
  3. Run pgsql\bin\pg_restore -U postgres -C -v -d postgres <filename> where <filename> is the database backup you want to restore. When it prompts for a password enter the PostgreSQL master password - default pgsqlpass
how_to/restore_a_database_backup.1368007594.txt.gz · Last modified: 2018/11/14 10:44 (external edit)