This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to:restore_a_backup_of_vpop3 [2011/07/25 09:11] – paul | how_to:restore_a_backup_of_vpop3 [2018/11/14 10:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
======How to Restore a backup of VPOP3====== | ======How to Restore a backup of VPOP3====== | ||
- | =====Version | + | The instructions below are to restore a full backup. You may also be able to [[recover deleted messages]] if you do not need to restore a full backup. |
+ | |||
+ | =====Version | ||
+ | If you just need to restore a database backup, see steps 4 to 7 below. | ||
+ | |||
+ | To restore a [[backup_vpop3|full backup of VPOP3]], | ||
+ | - If VPOP3 is already installed, make sure VPOP3 is shut down before starting the restore process | ||
+ | - Restore the files you made when you [[backup VPOP3|backed up VPOP3]] - do //NOT// restore anything in the **VPOP3\pgsql** folder tree | ||
+ | - Reinstall VPOP3 into the location where you restored VPOP3. This should reinstall the PostgreSQL database system. //Do not start VPOP3 at this time// | ||
+ | - Open a command prompt, and go to the VPOP3 directory | ||
+ | - 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. To do this, run **pgsql\bin\dropdb -U postgres -p <port number> vpop3**. When it prompts for the password enter the PostgreSQL master password - default **pgsqlpass**. (<port number> is usually 5433) | ||
+ | - Run **pgsql\bin\pg_restore -U postgres -p <port number> -v -C -d postgres DBBACK-< | ||
+ | - Start VPOP3 | ||
+ | |||
+ | =====Version 3 or 4===== | ||
If you just need to restore a database backup, see steps 4 to 6 below. | If you just need to restore a database backup, see steps 4 to 6 below. | ||
Line 10: | Line 24: | ||
- Open a command prompt, and go to the VPOP3 directory | - Open a command prompt, and go to the VPOP3 directory | ||
- 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. To do this, run **pgsql\bin\dropdb -U postgres vpop3**. When it prompts for the password enter the PostgreSQL master password - default **pgsqlpass**. | - 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. To do this, run **pgsql\bin\dropdb -U postgres vpop3**. When it prompts for the password enter the PostgreSQL master password - default **pgsqlpass**. | ||
- | - Run **pgsql\bin\pg_restore -U postgres -C -d postgres DBBACK-< | + | - Run **pgsql\bin\pg_restore -U postgres -C -d postgres DBBACK-< |
- Start VPOP3 | - Start VPOP3 | ||
- | You may also want to [[Restore folder V3|Restore | + | ====Increasing restore performance==== |
+ | When restoring the database backup it may take a very long time (depending on system performance, | ||
- | =====Version 2.6 or earlier===== | + | Do not do this if the PostgreSQL server is used for other things as well! |
- | To restore a backup of VPOP3, | + | |
- | - If VPOP3 is already installed, make sure VPOP3 is shut down before starting | + | In the **VPOP3\pgsql\data** folder: |
- | - Restore | + | - copy the '' |
- | - Restore the registry backup you made as well by double-clicking on the .REG file you made | + | - edit the '' |
- | - Reinstall VPOP3 into the location where you restored | + | - add the following to the bottom of the file: < |
+ | fsync = off | ||
+ | maintenance_work_mem | ||
+ | full_page_writes | ||
+ | wal_buffers | ||
+ | checkpoint_segments | ||
+ | - save the file (as ' | ||
+ | - restart the ' | ||
+ | - run the restore | ||
+ | - rename | ||
+ | - copy the '' | ||
+ | - restart The' | ||
+ | |||
+ | ====Related articles==== | ||
+ | |||
+ | - [[https:// | ||
{{tag> | {{tag> |