Merge remote-tracking branch 'origin/release/10.6' into dev

pull/8547/head
Oliver Günther 4 years ago
commit 6a97a53f6b
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 2
      docs/installation-and-operations/installation/packaged/README.md
  2. 25
      docs/installation-and-operations/misc/migration/README.md
  3. 15
      docs/installation-and-operations/operation/restoring/README.md

@ -239,6 +239,8 @@ sudo zypper install openproject
Then finish the installation by reading the [*Initial configuration*][initial-config] section. 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-config]: #initial-configuration
# Initial Configuration # Initial Configuration

@ -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: This guide should leave you with a set of archives that you should manually move to your new environment:
- **Database**: mysql-dump-\<timestamp>.sql.gz or postgresql-dump\<timestamp>.pgdump - **Database**: postgresql-dump\<timestamp>.pgdump
- **Attachments**: attachments-\<timestamp>.tar.gz - **Attachments**: attachments-\<timestamp>.tar.gz
- **Custom env configuration**: conf-\<timestamp>.tar.gz - **Custom env configuration**: conf-\<timestamp>.tar.gz
- **Repositories**: svn- and git-\<timestamp>.tar.gz - **Repositories**: svn- and git-\<timestamp>.tar.gz
@ -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). 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 ## Install new package
Follow the first step (**Installation**) of our packaged installation guides at https://www.openproject.org/download-and-installation/. Follow the first step (**Installation**) of our packaged installation guides at https://www.openproject.org/download-and-installation/.
@ -42,7 +46,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. 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). 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,12 +55,10 @@ To read the values from the old installation, you can execute the following comm
```bash ```bash
openproject config:get DATABASE_URL 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: 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 `<dbname>` so ensure this is the correct database you want to restore, as you will lose all data within it!
**PostgreSQL**
``` ```
# Restore the PostgreSQL dump # Restore the PostgreSQL dump
@ -64,17 +66,6 @@ pg_restore -h <dbhost> -u <dbuser> -W <dbname> --clean postgresql-dump-201804080
``` ```
**MySQL**
```bash
# Extract the mysql dump
zcat mysql-dump-20180408095521.sql.gz | mysql -u <dbuser> -h <dbhost> -p
<dbname>
```
### Attachments ### Attachments
Your storage path can be shown on the old installation can be shown using the following command: Your storage path can be shown on the old installation can be shown using the following command:

@ -65,26 +65,19 @@ Note: in this section, the `<dbusername>`, `<dbhost>` and `<dbname>` variables t
the values that are contained in the `DATABASE_URL` setting of your the values that are contained in the `DATABASE_URL` setting of your
installation. 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 ```bash
openproject config:get DATABASE_URL openproject config:get DATABASE_URL
#=> e.g.: postgres://<dbusername>:<dbpassword>@<dbhost>:<dbport>/<dbname> #=> e.g.: postgres://<dbusername>:<dbpassword>@<dbhost>:<dbport>/<dbname>
``` ```
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.
```bash 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.
pg_restore -h <dbhost> -p <dbport> -U <dbusername> -d <dbname> postgresql-dump-20191119210038.pgdump
```
Example:
```bash ```bash
$ openproject config:get DATABASE_URL pg_restore --clean --if-exists --dbname $(openproject config:get DATABASE_URL) postgresql-dump-20200804094017.pgdump
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 ### Restart the OpenProject processes

Loading…
Cancel
Save