# PSCS Wiki

### Sidebar

how_to:v3_-_move_to_a_new_pc

# Move VPOP3 Version 3 or 4 to a new PC

Moving VPOP3 Version 3 or 4 to a new PC is slightly different from moving earlier versions, because of the database system.

The summary of steps is:

1. Stop VPOP3 on the original PC
2. Manually make a backup of the database on the original PC
3. Copy the VPOP3 directory tree from the original PC to the new PC except for the VPOP3\pgsql directory
4. Copy the VPOP3 registry branch to the new PC
5. Install VPOP3 on the new PC, but do not start VPOP3 yet
6. Restore the database backup (from step 2) on the new PC
7. Reset some paths in the Windows registry
8. Check settings on new PC
9. Start VPOP3 on the new PC
10. Disable VPOP3 on the old PC if necessary

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 currently £40 (+ VAT) during our office hours. 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

## Stop VPOP3

First of all stop VPOP3 on the original PC

## Backup the database

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 -U vpop3 -f database.dmp

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)

## Copy the VPOP3 directory tree

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)

## Copy the VPOP3 registry branch

• On the original VPOP3 computer, run REGEDIT.
• Find HKEY_LOCAL_MACHINE\Software\PaulSmith on the left.
• Right-click the VPOP3 key on the left, and choose Export.
• Save it to a .REG file, eg VPOP3.REG
• Copy the file to the new PC
• Amend or edit as required (see below)
• Double-click the .REG file to import it into the registry on the new PC

(NB. If you are moving VPOP3 because the old computer died and you can't do this step, then you can skip it, but you will have lost many of the VPOP3 settings, so will have to reconfigure Mail Collectors, Senders etc from scratch)

### 64 Bit Windows Strangenesses

#### Moving from a 32 bit version of Windows to a 64 bit version of Windows

64 bit Windows stores registry entries for 32 bit Windows programs in HKEY_LOCAL_MACHINE\Software\WOW6432Node instead of in HKEY_LOCAL_MACHINE\Software, so, after creating the .REG file, run NotePad and load in the .REG file. Then, go to Edit → Replace. In the Find box, type HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3, and in the Replace with box, type HKEY_LOCAL_MACHINE\Software\WOW6432Node\PaulSmith\VPOP3, and press Replace All

Then continue with copying and importing the .REG file

#### Moving from a 64 bit version of Windows to a 64 bit version of Windows

64 bit Windows stores registry entries for 32 bit Windows programs in HKEY_LOCAL_MACHINE\Software\WOW6432Node instead of in HKEY_LOCAL_MACHINE\Software, so you need to export the registry branch HKEY_LOCAL_MACHINE\Software\WOW6432Node\PaulSmith\VPOP3 instead of the registry branch given above. Then, continue with the rest of the steps as above.

## Install VPOP3 on the new PC

Install VPOP3 on the new PC as normal, but:

1. Make sure you install into the same directory that you copied the VPOP3 directory tree to, so if you copied it to D:\VPOP3, make sure you install to D:\VPOP3. Most problems with moving VPOP3 are because they did not do this correctly.
2. At the end of the install, make sure you uncheck the Start VPOP3 option, so that VPOP3 does not run

If you are wanting to install a later version of VPOP3 as well as moving VPOP3, then at this step you would install the later version rather than the original version. However, make sure you install the 32 bit version of VPOP3 when upgrading from a version earlier than v5.

## Restore the Database Backup

If you installed v3 or v4 on the new PC, then go to the new PC, open up a command prompt and go to the VPOP3 directory. Then run

pgsql\bin\pg_restore -U postgres -d vpop3 database.dmp

At the password 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 installed version 5 or later in the previous step, then you may will need to specify the database server TCP/IP port in the pg_restore command, as version 5 and later use an alternative port to avoid conflicts with other instances of PostgreSQL. e.g:

pgsql\bin\pg_restore -U postgres -d vpop3 -p 5433 database.dmp

then the rest of the process is as normal

### If you had previously installed VPOP3 on the new computer

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 -U postgres -vpop3

At the command prompt, enter pgsqlpass

## Reset some paths in the Windows registry

Run RegEdit.

You may need to change the following entries to the appropriate subdirectory in the new installation folder. (If you have previously changed them from the default, you may wish not to change them after moving VPOP3)

• HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3 - MessageStore<VPOP3 folder>\_messages
• HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3 - LogPath<VPOP3 folder>\_logs
• HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3\Archiving - MainStore<VPOP3 folder>\_archive
• HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3\Attachments - AttachmentDirectory<VPOP3 folder>\_attach
• HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3\Attachments - InfectedDirectory<VPOP3 folder>\_infected
• HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3\Database - PostGreSQLBinDir<VPOP3 folder>\pgsql\bin
• HKEY_LOCAL_MACHINE\Software\PaulSmith\VPOP3\FaxServer - SpoolPath<VPOP3 folder>\_fax\out

## Check Settings on new PC

You should check for common potential issues on the new PC - see the installing VPOP3 topic for details.

## Start VPOP3

Finally start VPOP3

## Disable VPOP3 on the old PC

If the old PC will still be being used for other things, and you do not want VPOP3 to run on it, you should disable VPOP3 on it.

If you don't do this, you may end up with two copies of VPOP3 running at the same time, which will almost certainly cause strange things to happen.

There are two main options here:

1. Disable the VPOP3 service
2. Uninstall VPOP3

### Disable the VPOP3 service

Go to Control Panel → Administrative Tools → Services on the OLD computer

Find the VPOP3 service. Double-click it. If the Service Status is 'Started', press theStop button. In the Startup type, choose Disabled and press OK

Find the PostgreSQL - VPOP3 service and do the same again

### Uninstall VPOP3

Only uninstall VPOP3 if you will not want to run VPOP3 on this computer again, as it will clear all the data.

Go to Control Panel → Programs and Features on the OLD computer. Find the 'PostgreSQL' program, and uninstall that. Then find the 'VPOP3' program and uninstall that.

## Possible problems

If you have moved VPOP3 and find that settings such as licence details, mail collectors, etc have not been moved, then that means that the Windows Registry data was not copied over correctly in step 4. Or, if you are sure you copied it over, you may not have done the appropriate editing necessary when moving between 32 and 64 bit versions of Windows.

If the users are missing, that means that the USER.LST and USER2.LST files were not copied over in step 3 for some reason.

If the mappings are missing, that means that the MAILBOX.MAP file was not copied over in step 3 for some reason.