DocMGR Backup and Restoration Process
Notice!!!
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
Using Tsearch2 & SQL Dumps
-
First, make a copy of the DocMGR installation directory. If files/ is stored in a non-standard place,
copy it as well.
-
If you are running a 7.4.x version of postgresql, then be sure to run the regprocedure_update.sql file
in the scripts/ directory on your database. You can do that by running
"su postgres; /path/to/pgsql/bin/pg_dump -d docmgr -f /path/to/docmgr/scripts/regprocedure_update.sql"
-
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/docmgr/scripts/docmgr-XXX.sql
- /path/to/pgsql/bin/psql -d docmgr -f /path/to/backup/file.sql. Ignore "Function already exists" errors.
DISCLAIMER: I cannot be held responsible for any data loss/system
corruption that occurs as a result of using this program.
Copyright 2001. This software is distributed under Version 2 of the GNU General
Public License. See
License for more details