OpenProject backup and restore
Use the packaged backup command and restore the database and matching attachments, configuration and optional repositories.
Last updated
On this page (5)
OpenProject ยท Backup and restore
Before you start
- DEB/RPM installation and matching test release.
- PostgreSQL restore tooling.
- Fresh test database and permissions for target directories.
Procedure
- Pause application writes and run
sudo openproject run backup; collect the timestamped recovery set from/var/db/openproject/backup. - On a stopped test installation, inspect the tarballs, then extract attachments into
/var/db/openproject/files, configuration into/etc/openproject, and any Git/SVN tarballs into/var/db/openproject/gitand/var/db/openproject/svnrespectively. Adapt connection and integration settings for the test environment. - Use
pg_restore --dbname=openproject_test postgresql-dump-TIMESTAMP.pgdumpagainst a newly provisioned empty database, with the required roles or an explicit ownership mapping. Start the staged application once all parts are restored.
Verify the result
- Open a representative project and work package, download an attachment, and verify any associated repository.
- Confirm archives share the same recovery timestamp and background jobs start without contacting live integrations.
