This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
how_to:database_maintenance [2012/11/19 17:07] – [Freeing disk space] paul | how_to:database_maintenance [2018/11/14 10:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 22: | Line 22: | ||
Usually the best way of freeing disk space is to do a [[backup_vpop3# | Usually the best way of freeing disk space is to do a [[backup_vpop3# | ||
- | If you are very short of free disk space, then you can use the ' | + | ====Steps for backup/ |
+ | (These instructions are for VPOP3 v5 or later) | ||
+ | * Stop the VPOP3 service, //not// the VPOP3DB service | ||
+ | * Go to a command prompt in the VPOP3 directory | ||
+ | * Backup the database to a file, eg ' | ||
+ | * Make sure there were no errors reported during the backup! | ||
+ | * Remove the old database using **pgsql\bin\dropdb -U postgres -p 5433 vpop3** | ||
+ | * Restore the database backup using, eg: **pgsql\bin\pg_restore -v -j 4 -U postgres -p 5433 -C -d postgres database.dmp** | ||
+ | * Restart the VPOP3 service | ||
+ | |||
+ | If asked for a password, the default password to use is **pgsqlpass** | ||
+ | |||
+ | For further information, | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ====Alternative to backup/ | ||
+ | |||
+ | If you are very short of free disk space, then you can use the ' | ||
=====Rebuilding Indexes===== | =====Rebuilding Indexes===== | ||
If you suspect that indexes have become damaged, then you can reindex the database. Again, this requires VPOP3 to be stopped first. | If you suspect that indexes have become damaged, then you can reindex the database. Again, this requires VPOP3 to be stopped first. |