Upgrade OpenProject

It is strongly recommended to create a backup before starting the update process. If you have important data, create and try to restore a backup to ensure that everything works properly.

Follow these steps to only upgrade the application code without modifying any other stack components:

  • Launch a new OpenProject instance or server.

  • Copy the database backup to the new server.

  • Stop all servers and start only PostgreSQL.

      $ sudo /opt/bitnami/ stop
      $ sudo /opt/bitnami/ start postgresql
  • Remove the previous database and create the new one. You can configure the database user password with a secure password.

      $ psql -U postgres
      Password: ****
      postgres=# drop database bitnami_openproject;
      postgres=# create database bitnami_openproject;
      postgres=# grant all privileges on bitnami_openproject.* to 'bn_openproject'@'localhost' identified by 'DATABASE_PASSWORD';
  • Navigate to the OpenProject installation directory:

      $ cd /opt/bitnami/openproject
  • Restore the new database:

      $ psql -U postgres bitnami_openproject < backup.sql
    • Edit the OpenProject configuration file at config/database.yml to update the database user password to the one that set previously.

          adapter: postgresql
          encoding: unicode
          database: bitnami_openproject
          pool: 20
          username: bn_openproject
          password: "DATABASE_PASSWORD"
          host: localhost
  • Migrate the database to the latest version:

      $ bundle exec rake db:migrate RAILS_ENV=production
  • Copy the files folder, located in the OpenProject installation directory, from the old installation to the new one.

  • Finally, clean the cache and the sessions:

      $ bundle exec rake tmp:clear
    • Restart the servers and you can access the new OpenProject installation.

      $ sudo /opt/bitnami/ restart
Last modification February 9, 2023