Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Development
  1. OpenProject
  2. Forums
  3. Development
  4. Backup improvement suggestion

Backup improvement suggestion

Added by destroyedlolo Faillie almost 2 years 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)

RE: Backup improvement suggestion - Added by Markus Kahl almost 2 years ago

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?

RE: Backup improvement suggestion - Added by destroyedlolo Faillie almost 2 years ago

Hello,

In openproject/compose/control/backup, the entrypoint.sh contains :

filename="${timestamp}-pgdata.tar.gz"
echo "Backing up PostgreSQL data into backups/${filename}..."
tar czf "${filename}" -C "$PGDATA" .

About the packager version, it generate a binary version. A text one would be easier if modification is needed :)

Best regards,

Laurent

RE: Backup improvement suggestion - Added by Markus Kahl almost 2 years ago

Ah thanks, got it. We'll improve that.

  • (1 - 3/3)
Loading...