I have been running my Nextcloud instance on OpenSuse 15.3 which has reached EOL, so it was time to upgrade. Unfortunately, something went awry with the in-place 15.3->15.4 upgrade resulting in a trashed btrfs filesystem. Fair enough, not a problem, I have tiered backups using rsnapshot on a separate volume which include not only the Nextcloud www and data directories but also /etc for good measure. Before each rsnapshot run, I also mysqldump a copy of the Nextcloud database into the top of the data directory.
This time, unlike previous OpenSuse+Nextcloud builds, I'm not going to install the official Nextcloud package since it's always an older verion. I can just plonk the backup copy into /srv/www/htdocs and be done with it. I chose the LAMP server pattern for my OpenSuse install, restore the backup directory, and reload the database into MariaDB. All very simple but it ain't working, so what have I missed?
- Set permissions on the restored files. They should be owned by wwwrun and be chmod 750
- Apache config (you can use the Yast sysconfig tool for this),
- Add ssl, rewrite and headers to the modules list in sysconfig
- Make sure Apache is started with SSL option
- Restore the /etc/apache2 config directory from backup so it has vhosts and SSL config correct
- PHP config (I'm still with PHP 7 at this point)
- Make sure all the Nextcloud PHP module dependencies are installed
- Install php-apcu and php-cli
- Edit PHP config as outlined in my previous posting to enable opcache, apcu and up the memory limits.
- Cron config
- Restore /etc/cron.d from backup
- Change permissions on all the files to 644
- Letsencrypt config (seems to be installed be default in the 15.4 LAMP pattern)
- Restore /etc/letsencrypt from backup
- Networking
- Make sure hostname and IP address are set so that SSL certificates work externally
- Open firewall ports for http and https
If you remember these then the rebuild takes maybe an hour. A lot of this is restoring files - I'm using SSD's so if you are stuck with HDD's this might be rather longer.
Another trick is that OpenSuse 15.4 now offers a downloadable updated ISO image which includes patches. This speeds up the install a fair bit.
No comments:
Post a Comment