Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • 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
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional 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?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Expanded. Click to collapseCollapsed. Click to showWiki
        • Hierarchy leaf2nd Level Support
You are here:
  • Forums
  • Support Installation & Updates

Content

Backup/Restore procedure

Added by Igor Vitorac almost 9 years ago

What is the proper backup/restore procedure for OP?

According to the following link: https://www.openproject.org/projects/openproject/wiki/Migration_24_to_30

OpenProject has data in these places:
* Database (see config/database.yml to find out which one is used)
* openproject directory
Attachments are stored by default in openproject/files, in this case no separate backup is necessary.
If configured to be stored elsewhere check config/configuration.yml for attachments_storage_path and backup the files stored there.
* Repositories: If you're using repositories via reposman.rb, you should back them up. There's no standard path for them, you can find their path in the cron job running the script or in the individual project settings.

So, I guess, installing the ruby and other requrements/dependencies and then restoring the previosly made backup would be enough to have OP running on the newly installed server.

What is your backup/restore strategy?

Regards,
Igor


Replies (8)

RE: Backup/Restore procedure - Added by Gareth Pye about 8 years ago

I’d really love a backup and restore procedure for 4.0.X. I’ve got what I believe is a backup of everything important, but I have no idea how to restore it.

RE: Backup/Restore procedure - Added by Mike Dean about 8 years ago

From what I can tell, no one ever considered backups during the development of OpenProject.

  • The Bitnami installed version has an unacceptable backup procedure (SHUT DOWN the OpenProject services, ZIP up the whole enchilada, then RESTART the OpenProject services. In other words: a large installation will incur significant downtime for daily backups, and there is no consideration given to migrating the data to a newer version, since all of OpenProject itself is included with this lazy backup method).
  • The Manually installed version has a difficult to use backup system written in Ruby, which seems to be prone to breaking. I haven’t been able to get it to work long enough to find out what its limitations are.
  • The apt packaged openproject-ce version doesn’t have a backup system, because the Ruby backup system doesn’t work with it. They also decided to name their database openproject-ce instead of openproject like on other installs, just to further complicate migration from an old install to a new one that uses openproject-ce.

I’ve been searching high and low for an existing backup procedure that will work, and haven’t found anything useful. It’s incredibly annoying that backup is nothing but an afterthought on this project.

I’m afraid I’ll have to write my own set of backup and restore scripts, but maintenance could be a real pain, since we want to be able to upgrade when new versions of OP come available.

RE: Backup/Restore procedure - Added by Don Sefer about 8 years ago

This should be escalated with a high priority!
Backups are very important and I would love to get a working method, too…

I guess I have to get a faster server and we already configurated stuff and more and I would like to take everything over to the new server… This must be possible!

RE: Backup/Restore procedure - Added by Tyr Henkus almost 8 years ago

I totally agree… you really don’t want 10+ workers out of sync because “there was no recent backup”. I’d which to see a scheduler to manage .xml dumps to a remote FTP server or something like that. Getting email-updates in case anything is not working properly is also a must. Deleting backups older than x would be a nice addition.

Anyhow, thx a lot for the great work on OpenProject. Very nice job! But please fix this..

RE: Backup/Restore procedure - Added by Karsten Gallinowski almost 8 years ago

Hi,

first of all thank you for your feedback. I have the feeling that the issue is not the missing backup solution but rather the missing documentation of it.

To discuss what Mike mentioned:

  • Yes Bitnamis backup procedure may seem a little odd but from my point of view this installation type should only be used for evaluation / testing purpose. So backup should not be a concern.
  • There is a rake task available to backup the database. Everything else (svn repositories and attachment files) has to be backed up individually.
  • The packaged installation comes with a handy script to backup everything necessary. It can be executed via openproject-ce run backup or openproject run backup if you use only the core version.

Ok so far so good. As you can see the whole backup issue is something the community already thought about. Of course there are still things which have to be improved. But we can’t do it all at once and we can’t do it alone. So please help us to get things better.

@Mike: You mentioned that the rake task isn’t working correct?! Can you be more precise on that? If t is not working it is a bug and it will be fixed. Before you consider writing your own backup scripts please consider creating a Pull Request and change the rake task in the way you want it to work. OpenProject is open source. So we all can benefit from each other.

@all: If you are new to the Linux world and do not want to setup the rails stack by yourself please consider to use the packaged solution. This makes updates of OpenProject a lot easier. Ruby and stuff will be updated too. Setting everything up by yourself should only a option if you know exactly what you are doing. Unfortunately there are a lot of evil pitfalls.

Short notice on what has to be backed up:

  • Dump the database
  • tar the SVN Repositories if necessary
  • tar the attachments
  • Configuration (RailsRoot/config) files if you need

These three backups including the OpenProject code which is available at github should be all you need to restore your application.

Please if you have any further questions or remarks do not hesitate to comment on this post.

Cheers,
Karsten

RE: Backup/Restore procedure - Added by Mike Dean almost 8 years ago

Okay, perhaps I looked at it the wrong way, then. The issue apparently isn’t with this issue being ignored, but rather with it being misunderstood.

First, I’ll respond to this:

@Mike: You mentioned that the rake task isn’t working correct?! Can you be more precise on that? If t is not working it is a bug and it will be fixed. Before you consider writing your own backup scripts please consider creating a Pull Request and change the rake task in the way you want it to work. OpenProject is open source. So we all can benefit from each other.

I didn’t go into detail about this, because I made this determination by finding other existing bug reports in the OpenProject work issues.

Now, to this:

@all: If you are new to the Linux world and do not want to setup the rails stack by yourself please consider to use the packaged solution. This makes updates of OpenProject a lot easier. Ruby and stuff will be updated too. Setting everything up by yourself should only a option if you know exactly what you are doing. Unfortunately there are a lot of evil pitfalls.

Being new to Ruby is far different from being new to Linux. I, for example, deployed my first Apache web server and qmail mail server (it was popular back then) for a corporation back in the year 2000. I really have no idea how many Linux servers of various types I’ve deployed in the almost 15 years since then (it was around July of 2000, iirc). But Ruby is still a relative new comer to me. The attitude that Ruby = Linux/“The Linux World” is mistake number 1. If Ruby were an important part of Linux, it would be on the exam requirements the Linux Foundation Certified Engineer cert (http://training.linuxfoundation.org/certification/lfce).

Mistake number 2 is thinking that people actually want to run backup jobs manually. The script, as described, was obviously designed to be run manually. In a typical server deployment, the backup jobs need to be automated. Configuration files can be backed up manually, but the database, attachments, and SVN repos (if needed) should all be backed up automatically on a daily basis (at least incrementally, with full backups every weekend). The script does not accomodate this need.

Mistake number 3 is assuming the use of Ruby for automating this task on my end. I don’t know Ruby, and have no interest in learning it. I know bash, C, C, php, javascript, html, Verilog, VHDL, and various forms of BASIC. Out of these, the obvious choice for a backup script is bash. So if I have to do it myself, it will be written in bash. I wrote a quick and dirty bash script for this already, just to get something working. I really don’t have the time right now to write a good one; I simply have too many things on my plate.

To me, it looks like the programmers writing this don’t have any real world admin experience, and that’s why they missed the boat on backups. If you listen to experienced admins, though, you can make sure your backup system accommodates the way we run backups.

Aside from daily incrementals and weekly full backups, the number of files kept needs to have definable limits. Of course, the destinations for the backup files need to be configurable as well. One should be able to configure, for example:

Max_Incrementals_Kept = 5
Full_Backups_Frequency = weekly
Max_Weekly_Backups_Kept = 4
Max_Monthly_Backups_Keyp = 6
Timestamp_Format = ‘%M*%d*%Y-%H:%m:%s’ # For the backup file naming
Destination_Directory = /srv/backups
Destination_is_NFS_Mount = true # so it can make sure the NFS mount is good before putting files there
Destination_Alternate_Directory = /srv/local_backups # In case the primary destination is unusable
Notify_email = admin@openproject.org # Whom to e-mail for failures/successes
Notify_on_success = false
Notify_on_fail = true

These are, pretty much, the minimum options needed for a good automated backup system. The time of day/DoW for the backups could be set by the cronjob used to run it, or it could be part of the script (if it has a reliable daemon to run the backup jobs).

RE: Backup/Restore procedure - Added by Gareth Pye almost 8 years ago

“There is a rake task available to backup the database. Everything else (svn repositories and attachment files) has to be backed up individually.”

Sweet.

But how does one restore from it?

I’m 99% certain I have a complete backup. I’ve used that rake task and bundled up the output with the other directories listed and I’m keeping an archive of them. But as sane backups go, it isn’t a backup until I’ve tested it. And I’ve tried to find any description of how to use the output of that rake task and I can’t find it. My own intuitive attempts to use it have all failed at getting a working openproject instance. Could we have some guidance?

Also some of us are using manual installs because that was the only option available when we did our install. Migration from there to packages would be awesome.

RE: Backup/Restore procedure - Added by Tyr Henkus almost 8 years ago

Has anyone managed to automate this rake backup funktion? Or does anyone know of an open source script that just backups my whole disk to an externa location? I am that typical “project administrator” that you discribed earlyer. I’m expert in managing peojects, not in writing scripts. I understand what you are talking about, and have managed to install openproject on a VPS. But I realy would have no idea at all where to start conserning scheduled backups. I allready would be happy if the database is mailed to my email adress… It sounds like I don’t give a f*ck how, as long as i have a back up… Wel I do value qualitative software, but for me to test this software (which i am boing atm) I need real people working with the software in a real context, also to be able to give you feedback.. But the idea of losing everything in cas of… makes me want to fall back on dirty methods, suggestions pleas?

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