From 8553d21f994dad09c0d5634f12710df0fd604161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 4 Aug 2020 09:22:30 +0200 Subject: [PATCH 1/5] Update README.md [ci skip] --- .../misc/migration/README.md | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/docs/installation-and-operations/misc/migration/README.md b/docs/installation-and-operations/misc/migration/README.md index 683795b530..0f344009b4 100644 --- a/docs/installation-and-operations/misc/migration/README.md +++ b/docs/installation-and-operations/misc/migration/README.md @@ -10,7 +10,7 @@ To create a dump of all your data in the old installation, please follow our [ba This guide should leave you with a set of archives that you should manually move to your new environment: -- **Database**: mysql-dump-\.sql.gz or postgresql-dump\.pgdump +- **Database**: postgresql-dump\.pgdump - **Attachments**: attachments-\.tar.gz - **Custom env configuration**: conf-\.tar.gz - **Repositories**: svn- and git-\.tar.gz @@ -42,7 +42,7 @@ You can simply look through the installer.dat and change those values you need. Additional environment, either generated from the wizard or entered by you through `openproject config:set` is written to `/etc/openproject/conf.d/{server,database,other}`. Also look through those and check which contain relevant values for your new installation. -### Database +### PostgreSQL database On your new host or cluster, ensure you have created a database user and database, ideally using the same names as the old environment (You may want to choose a different random password, however). @@ -51,30 +51,17 @@ To read the values from the old installation, you can execute the following comm ```bash openproject config:get DATABASE_URL -#=> e.g.: mysql2://dbusername:dbpassword@dbhost:dbport/dbname +#=> e.g.: postgres://dbusername:dbpassword@dbhost:dbport/dbname ``` First the dump has to be extracted (unzipped) and then restored. The command used should look very similar to this: -**PostgreSQL** - ``` # Restore the PostgreSQL dump pg_restore -h -u -W --clean postgresql-dump-20180408095521.pgdump ``` - -**MySQL** - -```bash -# Extract the mysql dump -zcat mysql-dump-20180408095521.sql.gz | mysql -u -h -p - -``` - - - ### Attachments Your storage path can be shown on the old installation can be shown using the following command: From 29789b71f1fbc66dc6ea7e0ce87d37eb17fcdff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 4 Aug 2020 09:37:04 +0200 Subject: [PATCH 2/5] Update README.md [ci skip] --- .../installation-and-operations/installation/packaged/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/installation-and-operations/installation/packaged/README.md b/docs/installation-and-operations/installation/packaged/README.md index 4bd07ee82e..ac4ac212c8 100644 --- a/docs/installation-and-operations/installation/packaged/README.md +++ b/docs/installation-and-operations/installation/packaged/README.md @@ -239,6 +239,8 @@ sudo zypper install openproject Then finish the installation by reading the [*Initial configuration*][initial-config] section. +**Note:** For SLES12, we do not provide required dependencies for full-text extraction of attachments. If you need this feature, please install the required dependencies (`catdoc unrtf poppler-utils tesseract-ocr`) manually. For more information, [please see the plaintext gem](https://github.com/planio-gmbh/plaintext). Once installed, check `Administration > Information` to see if OpenProject is able to pick up these dependencies. + [initial-config]: #initial-configuration # Initial Configuration From af3c2a52d2ea4f7647c89acd41b40c2877623793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 4 Aug 2020 09:52:29 +0200 Subject: [PATCH 3/5] Update README.md [ci skip] --- .../operation/restoring/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/installation-and-operations/operation/restoring/README.md b/docs/installation-and-operations/operation/restoring/README.md index 0ec3f94bd4..42502cfe6a 100644 --- a/docs/installation-and-operations/operation/restoring/README.md +++ b/docs/installation-and-operations/operation/restoring/README.md @@ -65,17 +65,19 @@ Note: in this section, the ``, `` and `` variables t the values that are contained in the `DATABASE_URL` setting of your installation. -First, get the necessary details about your database: +First, ensure the connection details about your database is the one you want to restore ```bash openproject config:get DATABASE_URL #=> e.g.: postgres://:@:/ ``` -Then, to restore the PostgreSQL dump please use the `pg_restore` command utility: +Then, to restore the PostgreSQL dump please use the `pg_restore` command utility. **WARNING:** The command `--clean --if-exists` is used and it will drop objects in the database and you will lose all changes in this database! Double-check that the database URL above is the database you want to restore to. + +This is necessary since the backups of OpenProject does not clean statements to remove existing options and will lead to duplicate index errors when trying to restore to an existing database. The alternative is to drop/recreate the database manually, if you have the permissions to do so. ```bash -pg_restore -h -p -U -d postgresql-dump-20191119210038.pgdump +pg_restore --clean --if-exists --dbname $(openproject config:get DATABASE_URL) postgresql-dump-20200804094017.pgdump ``` Example: From 3e064a1ea48291a685f57d9eb941d5363abe6738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 4 Aug 2020 13:30:21 +0200 Subject: [PATCH 4/5] Update README.md [ci skip] --- docs/installation-and-operations/misc/migration/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/installation-and-operations/misc/migration/README.md b/docs/installation-and-operations/misc/migration/README.md index 0f344009b4..0bf1154b1f 100644 --- a/docs/installation-and-operations/misc/migration/README.md +++ b/docs/installation-and-operations/misc/migration/README.md @@ -19,6 +19,10 @@ This guide should leave you with a set of archives that you should manually move The following steps outline the migration process to the OpenProject package (possibly, a newer version). +## Stop OpenProject on old server + +To stop the servers from being accessed on the old installation, stop the service with `service openproject stop` or `systemctl stop openproject` depending on your distribution. + ## Install new package Follow the first step (**Installation**) of our packaged installation guides at https://www.openproject.org/download-and-installation/. @@ -54,7 +58,7 @@ openproject config:get DATABASE_URL #=> e.g.: postgres://dbusername:dbpassword@dbhost:dbport/dbname ``` -First the dump has to be extracted (unzipped) and then restored. The command used should look very similar to this: +First the dump has to be extracted (unzipped) and then restored. The command used should look very similar to the following. The `--clean` option is used to drop any database object within `` so ensure this is the correct database you want to restore, as you will lose all data within it! ``` # Restore the PostgreSQL dump From 37cb675622dac76b48a06b2d8e9691d32733e82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 5 Aug 2020 07:14:59 +0200 Subject: [PATCH 5/5] Update README.md [ci skip] --- .../operation/restoring/README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/installation-and-operations/operation/restoring/README.md b/docs/installation-and-operations/operation/restoring/README.md index 42502cfe6a..f2527a2e6b 100644 --- a/docs/installation-and-operations/operation/restoring/README.md +++ b/docs/installation-and-operations/operation/restoring/README.md @@ -80,15 +80,6 @@ This is necessary since the backups of OpenProject does not clean statements to pg_restore --clean --if-exists --dbname $(openproject config:get DATABASE_URL) postgresql-dump-20200804094017.pgdump ``` -Example: - -```bash -$ openproject config:get DATABASE_URL -postgres://openproject:L0BuQvlagjmxdOl6785kqwsKnfCEx1dv@127.0.0.1:45432/openproject - -$ pg_restore -h 127.0.0.1 -p 45432 -U openproject -d openproject postgresql-dump-20191119210038.pgdump -``` - ### Restart the OpenProject processes Finally, restart all your processes as follows: