From 30bf5f9fa76568c35765bedbc3fcafbf4ea86181 Mon Sep 17 00:00:00 2001 From: exu Date: Sat, 4 Nov 2023 21:21:57 +0100 Subject: [PATCH] Add migration steps --- pages/02.linux/nextcloud/default.en.md | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pages/02.linux/nextcloud/default.en.md b/pages/02.linux/nextcloud/default.en.md index bf60dd4..5e1eebb 100644 --- a/pages/02.linux/nextcloud/default.en.md +++ b/pages/02.linux/nextcloud/default.en.md @@ -261,6 +261,47 @@ mariadb -h [SERVER] -u [USERNAME] -p[PASSWORD] [DB NAME] < nextcloud-sqlbkp.bak > [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html) +## Migration + +### Tips + +- Allow login to the original host as root user + +### Steps + +- (New host) Install dependencies +- (Original host) Enable maintenance mode +- (Original host) Create database backup +- (New host) Restore database backup +- (New host) Recreate Nextcloud database user +- (New host) Copy full Nextcloud folder + - Preserve the permissions as much as possible (see rsync command below) + - `sudo rsync -a --progress root@172.18.50.101:/var/www/nextcloud /var/www/` +- (New host) Copy apache2 configuration file +- (New host) Enable apache2 Nextcloud site and disable default site +- (New host) Redo php limits configuration +- (New host) Upgrade Nextcloud (required for php 8.2 compatibility) + +### Notes on configuration files + +#### PHP + +##### Apache2: `/etc/php/8.2/apache2/php.ini` + +Change `memory_limit` to `1G` + +Disable `post_max_size` by setting `0` +Previously used `20G` in the old Nextcloud installation + +Change `upload_max_filesize` to `20G` + +##### CLI: `/etc/php/8.2/cli/php.ini` + +Disable `post_max_size` by setting `0` +Previously used `20G` in the old Nextcloud installation + +Change `upload_max_filesize` to `20G` + ## Collabora Online Container ! This chapter is unfinished