User Tools

Site Tools


How to estimate Database Upgrade Time

When upgrading from VPOP3 version 3 or 4 to version 5, the PostgreSQL database engine needs to be upgraded. This involves backing up the database data, upgrading the database engine, then restoring the data. This can take some time on large databases.

To estimate how long this process will take, you can do the following steps:

  1. Go to a command prompt on the VPOP3 computer, and go to the VPOP3 directory.
  2. Run pgsql\bin\pg_dump -v -F c -U vpop3 -f database.dmp
  3. 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)

By timing this process you will know how long it takes to backup the database data.

Then, do a test restore.

At the command prompt in the VPOP3 directory:

  1. Run pgsql\bin\createdb -U postgres -E SQL_ASCII -O vpop3 -T template0 vpop3test (password is 'pgsqlpass')
  2. Run pgsql\bin\pg_restore -v -d vpop3test -U postgres database.dmp (password is 'pgsqlpass')

By timing this process you will know how long it takes to restore the database data

Then, to clean up:

  1. Run pgsql\bin\dropdb -U postgres vpop3test (password is 'pgsqlpass')
how_to/estimate_db_upgrade_time.txt · Last modified: 2018/11/14 10:45 by