Backup Procedure
Be sure to try these methods out for yourself on a working database, and verify that you can successfully backup and restore your data before waiting until you have an actual crash. With any backup, you should always verify your backup/restoration procedure works!!! Quick Solution
If you have compiled postgresql from source and installed it to it's own directory, you may simply make a copy of the pgsql directory and the DocMGR directory. If you store files/ in a non-standard location, be sure to back that up as well. If your server crashes, simply restore those directories and all should be fine. This is as long as you are running a compatible glibc version on the replacement server. Using SQL Dumps (Non-tsearch2 users)
First, make a copy of the DocMGR installation directory. If files/ is stored in a non-standard place, copy it as well.
Backup your DocMGR database by performing the following steps:
- su postgres
- /path/to/pgsql/bin/pg_dump -d docmgr -f /path/to/backup/file.sql
To restore the database perform the following steps:
- su postgres
- /path/to/pgsql/bin/createdb docmgr
- /path/to/pgsql/bin/psql -d docmgr -f /path/to/backup/file.sql