So using the next cloud admin login I tried to change to nextcloud 12.1 from 12.
The first error I encountered was assets folder in /usr/share/nextcloud which is empty. It had to be deleted for the upgrade to continue.
The next error now is: Delete old files Could not unlink: /usr/share/nextcloud/updater/…/.htaccess
Now when I try to login to nextcloud it just says "update in process"
So I tried restoring /usr/share/nextcloud/config/config.php and /var/lib/nethserver/nextcloud (love the new backup and restore!) however same problem.
My only other choice is to restore root and hope for the best but I’m nervous I’ll loose everything. Any ideas on how to fix this?
As the nextcloud installation comes from an rpm package I’d advice to use the update method provided by the distro (ask/wait for a new package release), and forget about nextcloud’s built-in updater.
I’ve recreated the problem and for me these two methods have worked (not to update nextcloud version but to get back on track).
Method 1:
Check if you still have the backup made by Nextcloud’s built-in updater:
ls -l /var/lib/nethserver/nextcloud/updater-*/backups/
Restore nextcloud’s config.php file form a backup (if no backup present, edit /usr/share/nextcloud/config/config.php deleting the lines referring to maintenance and updater secret)
Agree wth @alefattorini.
Just thinking, doesn’t the NS version of Nextcloud include the occ script / command, could you not just use a command like ‘occ update’ or ‘occ upgrade’ to achive similar resaults?
On my tests I used -rf to force deletion without confirmation, but ommitted it in the given instructions as it’s dangerous if there’s a misstype in the path.
I have used occ on a failed update succesfully (NC version 11.0.4) and have recently installed / updated NC on my Banana PI / Debian project (originally installed NC v12.0.1, then upgraded it to v12.0.2).
Note: I needed to change file / directory permissions to achive the upgrade to 12.0.2 using the following commands:
cd /var/www/ (or the directory that the NC installation resides within) chown root:www-data ./nextcloud -R chmod g+w ./nextcloud -R