Content
You are here:
Backup improvement suggestion
Added by destroyedlolo Faillie over 1 year ago
Hello,
Currently, the database backup is done by _tar-_ing raw postgresql storage ... which implies an application outage (as it's totally unsafe if the database is running).
Is any special reason no using pg_dump ? Added values are :
- no database outage, only a shared lock is requested
- dump only openproject db, the cluster can be shared with other application if needed
- dump is done is clear SQL text. It's very easy to modify anything if needed
Frankly speaking, it's the way I'm backuping my PoC environment, and been able to switch b/w packaged and docker version without any pain or data loss. Easy, safe, stable and in line with usual database administration task :)
Laurent
Replies (3)
Hi,
the backup script in OpenProject's packaged installation does use pg_dump. As for docker there is a PVC for the database, yes. But it's not meant as a backup. At the end of the day the server admins are responsible for doing the backups.
In the case of packager they can use
sudo openproject run backup
and store that somewhere safe.For docker one should just pg_dump from the db container as you do.
Where did you come across the backup mechanism you mentioned where the postgres data directory is simply archived?
Hello,
In openproject/compose/control/backup, the entrypoint.sh contains :
About the packager version, it generate a binary version. A text one would be easier if modification is needed :)
Best regards,
Laurent
Ah thanks, got it. We'll improve that.