This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
how_to:database_maintenance [2015/09/23 12:46] 127.0.0.1 external edit |
how_to:database_maintenance [2018/11/14 10:45] (current) |
||
---|---|---|---|
Line 28: | Line 28: | ||
* Go to a command prompt in the VPOP3 directory | * Go to a command prompt in the VPOP3 directory | ||
* Backup the database to a file, eg 'database.dmp', using, eg: **pgsql\bin\pg_dump -p 5433 -v -F c -U postgres -f database.dmp vpop3** | * Backup the database to a file, eg 'database.dmp', using, eg: **pgsql\bin\pg_dump -p 5433 -v -F c -U postgres -f database.dmp vpop3** | ||
+ | * Make sure there were no errors reported during the backup! | ||
* Remove the old database using **pgsql\bin\dropdb -U postgres -p 5433 vpop3** | * 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** | * Restore the database backup using, eg: **pgsql\bin\pg_restore -v -j 4 -U postgres -p 5433 -C -d postgres database.dmp** |