From 051792533a49603ebc2dbbb51147527e245482d1 Mon Sep 17 00:00:00 2001 From: NeroBurner Date: Thu, 10 Oct 2019 15:16:07 +0200 Subject: [PATCH] README: add postgresql commands to migration section Signed-off-by: NeroBurner --- README.md | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e8c31eb1..a20d2437 100644 --- a/README.md +++ b/README.md @@ -347,16 +347,28 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som 1. Define your whole Nextcloud infrastructure in a `docker-compose` file and run it with `docker-compose up -d` to get the base installation, volumes and database. Work from there. 2. Restore your database from a mysqldump (nextcloud\_db\_1 is the name of your db container) -```console -docker cp ./database.dmp nextcloud_db_1:/dmp -docker-compose exec db sh -c "mysql -u USER -pPASSWORD nextcloud < /dmp" -docker-compose exec db rm /dmp -``` + - To import from a MySQL dump use the following commands + ```console + docker cp ./database.dmp nextcloud_db_1:/dmp + docker-compose exec db sh -c "mysql -u USER -pPASSWORD nextcloud < /dmp" + docker-compose exec db rm /dmp + ``` + - To import from a PostgreSQL dump use to following commands + ```console + docker cp ./database.dmp nextcloud_db_1:/dmp + docker-compose exec db sh -c "psql -U USER --set ON_ERROR_STOP=on nextcloud < /dmp" + docker-compose exec db rm /dmp + ``` 3. Edit your config.php 1. Set database connection - ```php - 'dbhost' => 'db:3306', - ``` + - In case of MySQL database + ```php + 'dbhost' => 'db:3306', + ``` + - In case of PostgreSQL database + ```php + 'dbhost' => 'db:5432', + ``` 2. Make sure you have no configuration for the `apps_paths`. Delete lines like these ```diff - "apps_paths" => array (