Backup
From Projectivity Documentation
Contents |
Warning
Regular Data backups are essential administration tasks to avoid data loss. Always make a backup before updating your Projectivity environment.
If you run Projectivity in a mission critical environment you should consider Projectivity Certified Virtual Machine that includes an advanced administration console that, among other features, seamlessly allow data backup/restore.
How to backup
Projectivity stores data in 4 data-stores:
- PostgreSQL Data base: relational data
- Subversion: Documents Repositories
- Workspaces Lucene indexex
- Documents Lucene index
Also you need to backup your properties files and templates:
- Projectivity Property file
- Framework properties
- Email and Report Templates
In order to backup your system you should first stop Projectivity and then backup the data stores. Refer to the following table to backup all needed datastores:
| data store | how to backup | notes |
|---|---|---|
| DB | use PostgreSQL pg_dump utility
pg_dump --verbose --data-only -h 127.0.0.1 -p 5432 -b --file="db-py.dump" --format=c --no-owner pydb | pg_dump command all in one line |
| Subversion | cd <PROJECTIVITY>/utils
java -cp lib/svnkit.jar:lib/svnkit-cli.jar org.tmatesoft.svn.cli.SVNAdmin dump <PROJECTIVITY>/documents-repo > svn-py.dump | java command all in one line
this dump might be very big |
| Workspace Index | copy the content of directory <PROJECTIVITY>/workspaces-index | |
| Documents Index | copy the content of directory <PROJECTIVITY>/documents-index | |
| Frameworks Properties | copy the content of directory <PROJECTIVITY>/frameworks | you backup this once since it is static configuration data |
| Property file | copy the content of directory <PROJECTIVITY>/server/projectivity/deploy/projectivity-properties-service.xml | you backup this once since it is static configuration data |
| Email and Report templates | copy the content of directories <PROJECTIVITY>/email_templates and <PROJECTIVITY>/report | you backup this once since it is static configuration data |
NOTES:
- <PROJECTIVITY> refers to the Projectivity Installation directory
- On Windows replace / with \
How to restore
DB
- delete old db
- recreate the db
- pg_restore --disable-triggers -d pydb -v -i -h 127.0.0.1 -p 5432 -U postgres db-py.dump
Subversion
- delete old repository
- create an empty repository
cd <PROJECTIVITY>/utils
java -cp lib/svnkit.jar:lib/svnkit-cli.jar org.tmatesoft.svn.cli.SVNAdmin create <PROJECTIVITY>/documents-repo - load backup data
cd <PROJECTIVITY>/utils
java -cp lib/svnkit.jar:lib/svnkit-cli.jar org.tmatesoft.svn.cli.SVNAdmin load <PROJECTIVITY>/documents-repo < svn-py.dump
Other files
- Delete old files
- Copy back the backup files to the corresponding directories

