User Tools

Site Tools


Database -> Restore Tab

This tab is only in VPOP3 Enterprise (v5 and later), and is for performing a partial (mailbox/mail folder) restore of the database. To do a full restore of the database, or for VPOP3 Basic/Standard, see the “Restore a Backup of VPOP3” topic

Using the Restore tab, you can recover one or more users' full mailboxes or individual messages from a backup. Note that you cannot filter by date, so if you just want to recover a few messages you should probably restore into a different mailbox/folder from the original location, and then move the desired messages across.

Also, you can use the Message Recycle Bin facility to recover messages which have been deleted within the last few days.

To use this database restore facility, first you need to restore a database backup to a temporary database. This will usually be done on the VPOP3 computer itself, but you may restore it to an installation of PostgreSQL 9.1 or later on another PC if necessary, for instance if there is insufficient disk space on the VPOP3 computer.

Restoring a VPOP3 database backup to a temporary database

To restore a backup to a temporary database on the VPOP3 computer, go to a command prompt in the VPOP3\pgsql\bin folder and run a command like

createdb -U postgres -E SQL_ASCII -p 5433 -T template0 vpop3temp

(password pgsqlpass)

This will create a database called 'vpop3temp'

Then, run a command like:

pg_restore -U postgres -p 5433 -d vpop3temp -j 4 -v dbback.dmp

(password pgsqlpass)

This will restore the 'dbback.dmp' backup into the 'vpop3temp' database

Restoring message data from the temporary database

Then, in the VPOP3 settings, enter the connection details into the Restore tab.


  • Server: localhost
  • Username: postgres
  • Password: pgsqlpass
  • Port: 5433
  • Database: vpop3temp

(If you need to enter customised parameters, you can edit the Connection String value directly (see the PQconnectdbParams section of the libpq connect documentation for available options))

Choose the appropriate users/folders from the grid underneath the connection parameters

Finally, you choose what to do with the restored messages. You can select the target user where the restored messages will go (or 'Original User' for the messages to go to the original user), and the target folder for them to be restored to (or leave blank to go to the original folder). You can also specify whether restored messages should be marked as unread, and/or flagged (or 'starred', depending on how your email client displays the IMAP4 'flagged' message status).

When you press Start Restore the restore process starts. It may take some time depending on how many messages need to be restored. You can continue using VPOP3 or edit more settings while the restore process is running.

Cleaning Up

Once the messages have been restored you can remove the temporary database

Go to a command prompt in the VPOP3\pgsql\bin folder and run a command like

dropdb -U postgres -p 5433 vpop3temp

(password pgsqlpass)


  • If a restored message already exists in the message store, it will be duplicated, so you will get the original copy PLUS the restored copy
  • If a message is to be restored to a folder which no longer exists, VPOP3 will create the folder for you
  • The restored messages will be stored in a folder according to the following table:
Selected Target User Selected Target Folder Number Of Users Being Restored Destination User Destination Folder
Original <blank> any <original user> <original folder>
Original Y any <original user> Y/<original folder>
X <blank> 1 X <original folder>
X <blank> >1 X <original user>/<original folder>
X Y 1 X Y/<original folder>
X Y >1 X Y/<original user>/<original folder>
reference/database_restore.txt · Last modified: 2018/11/14 10:45 (external edit)