User Tools

Site Tools


how_to:move_the_message_store_-_alternative_method

Move the message store - alternative method

This method moves the database data storage location, but not the whole database. This means that the database configuration, logs, transaction logs etc are still stored in the VPOP3\pgsql\data folder, but the actual database tables & indexes are stored in the new location. This may be simpler, but, depending on your requirements, moving the entire database may be better.

In technical terms, this method uses PostgreSQL 'Tablespaces'

To do this:

  1. Create a new folder on the disk where you want the data to be stored (eg 'd:\vpop3data'). Set the security permissions for this to give full permissions in that folder to the vpop3postgres user (or postgres if you are using VPOP3 version 3 and 4)
  2. Open a command prompt, and go to the VPOP3 directory (eg 'cd \vpop3')
  3. Type pgsql\bin\psql -U postgres -p 5433 vpop3 (for version 5 or later. If you are using version 3 or 4, omit the -p 5433). The default password here is 'pgsqlpass'
  4. Type CREATE TABLESPACE vpop3ts OWNER vpop3 LOCATION 'd:\vpop3data'; (use the appropriate folder name here)
  5. Type ALTER DATABASE vpop3 SET TABLESPACE vpop3ts;
  6. Wait (while the data is all moved across to the new location)
  7. Type \q to leave the psql command prompt
how_to/move_the_message_store_-_alternative_method.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1