This is an old revision of the document!
Moving VPOP3 Version 5 or later to a new PC is slightly different from moving earlier versions, because of the database system, which was introduced for version 3 and modified for version 5.
The summary of steps is:
Please make sure you follow these instructions in the correct order. Many problems with moving installations are because people have thought we have got it wrong, and so do things in a different (incorrect) order.
If you want, we can do this move for you via remote access. The charge for us to do that is £20 (+ VAT). If you want us to do this, make sure that it is possible to copy files between the PCs on your network (or have copied all the necessary files beforehand). Copying the files over the Internet to our office and then back again is not feasible given the large amounts of data that can be present.
You can follow most of these steps if VPOP3 was on a PC that died, and you are moving it to a replacement PC. However, this is less ideal than restoring from the latest daily backup you made. If you were not previously backing up VPOP3, this may be a good time to start…
First of all stop VPOP3 on the original PC
To backup the database, go to a command prompt on the VPOP3 computer, and go to the VPOP3 directory. Then run
pgsql\bin\pg_dump -F c -p 5433 -U vpop3 -f database.dmp
Note: the above line (and all subsequent database command lines on this page) assume port 5433 is being used. This will work in the majority of cases, but in certain circumstances, a different port number may be required.
At the password prompt, type vpop3pass (This assumes a standard installation, if your PostgreSQL installation is non-standard, then you may need to change this command appropriately)
This will create a file 'database.dmp' containing a backup of the database in the VPOP3 directory so it will be copied by the next step
(NB. If you are moving VPOP3 because the old computer died and you can't do this step, then (by default) VPOP3 makes backups into the VPOP3 directory called DBBACK-x.DMP, you can use the latest one of those files instead)
How you do this depends on your network setup.
The easiest way to copy it all except for the VPOP3\pgsql directory is often to copy everything, then delete the VPOP3\pgsql from the new PC after the copy has finished
Note that if you are moving to Windows Vista/2008/7 or later, we strongly recommend that you do not copy the files to the 'Program Files' (or 'Program Files (x86)') folder on the new PC as that can cause problems for VPOP3, because Windows has restrictions on what can be put into these folders. (Maybe copy it to a C:\VPOP3 folder instead)
Install VPOP3 on the new PC as normal, but:
On the new PC, open up a command prompt and go to the VPOP3 directory. Then run
pgsql\bin\pg_restore -p 5433 -U postgres -d vpop3 database.dmp
At the command prompt, enter pgsqlpass
This will import the data to the database system on the new PC
Note that during this step you may see a couple of errors which are not important: there may be an error about the database already existing, and also an error that the 'plpgsql' language is already installed. (Each of these errors may have several lines in the output). If there are lots of errors, then there may be a problem and you should contact support@pscs.co.uk.
If you had previously installed VPOP3 on the new computer (which is not recommended), then you need to “drop” the existing database before restoring the database from the old computer as above.
To drop the database, on the new PC, open up a command prompt and go to the VPOP3 directory. Then run
pgsql\bin\dropdb -p 5433 -U postgres -vpop3
At the command prompt, enter pgsqlpass
You should check for common potential issues on the new PC - see the installing VPOP3 topic for details.
Finally start VPOP3