Has anyone successfully migrated from 17 to 18 on an existing Nextcloud plugin install?

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
I have Nextcloud installed as a plugin in FreeNAS and tuned and tweaked it to work perfectly meaning i made a significant amount of changes to fix a number of issues i encountered which took me quite a bit of time. I have set up SSL with a reverse proxy with ACME certs and Haproxy in pfsense which is working beautifully. The plugin version is still indicating 17.0.1 in FN whereas i have continued to upgrade from within NC and am now on 17.0.6. Everything still working like a charm.

The big question now is, is there any benefit from moving from 17 to 18 and if so, is there is any way to migrate from 17.0.6 to 18 without having to go through the painful installation process from scratch?
 

hanini

Cadet
Joined
May 14, 2020
Messages
2
I was able to migrate my existing FreeNAS Nextcloud plugin from 17 to 18.

Before I started I backed up my NGINX /usr/local/etc/nginx/conf.d/nextcloud.conf file since I made some tweaks to it that ultimately ended up in master branch of the Nextcloud plugin. In the "nextcloud" jail shell. Then I upgraded the nextcloud jail itself from the 11.2 release to 11.3. In the FreeNAS shell (not the nextcloud jail shell):

iocage upgrade nextcloud

That upgraded the Nextcloud package to 18. I didn't try doing so from the Web UI since I've varied success with it. I then modified the nextcloud.conf file I that I backed up earlier, as needed.

After restarting the Nextcloud plugin, I attempted to update Nextcloud through the Nextcloud Web UI. It complained about Nextcloud files with an owner/group that didn't match the web server owner/group, i.e. www. After correcting the file ownership, the Nextcloud Web UI based update succeeded.

Finally, I went to the Settings->Overview page in the Admin Nextcloud account to check the installation. It suggested several changes to the underlying MySQL database (missing indices, etc) , as well as installing the imagick PHP module (e.g., provided by the php74-pecl-imagick-im7 package) to improve image processing performance. The latter was recently added a dependency for the nextcloud plugin, as well. Don't forget to restart php-fpm or the plugin itself if you install the package manually.

Good luck!
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
My jail is already at 11.3 and i used the iocage upgrade -r 11.3-RELEASE jailname command at the time but nextcloud is still on 17. It shows 17.0.1 in the FreeNAS GUI and 17.0.6 in Nextcloud as i upgraded it from within Nextcloud a couple of times in the past. What i would need to be sure of is that the plugin version in FreeNAS now is higher than 17.0.6 and this i cannot see.
 
Joined
Jan 4, 2014
Messages
1,644
The big question now is, is there any benefit from moving from 17 to 18
NC 19 is at RC2 so its release is not far off. Probably a good idea to upgrade to 18.

is there is any way to migrate from 17.0.6 to 18 without having to go through the painful installation process from scratch?
Are you not able to update from within NC by changing from the stable train to the beta train? You might want to check further on the NC forum.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Are you not able to update from within NC by changing from the stable train to the beta train? You might want to check further on the NC forum.

Nope, if i change to the beta train, it still says my version is up to date. I read somewhere it might have to do with my php version (currently 7.1.33) but at the same time, it states it is not recommended to update php outside the plugin package.
 
Joined
Jan 4, 2014
Messages
1,644

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Well, i tried to update from within the FreeNAS GUI and think i screwed the installation up. It updated the plugin but now give me an internal server error:
Code:
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.


Any recommendations how i can root cause this or do i just need to remove the jail and do an entire new plugin install?
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
Does anyone know that if i delete the Nextcould jail, it also deletes all the data of all users?
 
Joined
Jan 4, 2014
Messages
1,644
If you built NC using the plugin, data is stored within the jail so, yes, you will lose it. The error you're seeing is internal to NC. I suggest you seek assistance on the NC forum. A search there brings up a lot of threads for 'internal server error'.
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
If you built NC using the plugin, data is stored within the jail so, yes, you will lose it.

i am confused about this one. When i go to mnt/Data i see 2 directories, iocage and nextcloud. The nextcloud directory houses all the data but is not located within the iocage directory. Is there any way i can copy the nextcloud folder to my local laptop drive?
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
If you built NC using the plugin, data is stored within the jail so, yes, you will lose it. The error you're seeing is internal to NC. I suggest you seek assistance on the NC forum. A search there brings up a lot of threads for 'internal server error'.

Well, i eventually made an SMB share and copied the entire content from NC to my fileshare, deleted the jail and installed the plugin from scratch which worked well. I am on 18.0.4 now and everything seems to be working as a charm. I am currently uploading the files again to the different accounts and reconnecting the apps on everyone's mobile. It was a bit hassle but i am now on the latest version and am going to refrain from making any changes other than updating the plugin through FreeNAS.
 

hanini

Cadet
Joined
May 14, 2020
Messages
2
I'm glad things worked out. It seems like the plugin upgrades are hit or miss, even when using pkg update or upgrade within the plugin shell. :-\
 

ddaenen1

Patron
Joined
Nov 25, 2019
Messages
318
I'm glad things worked out. It seems like the plugin upgrades are hit or miss, even when using pkg update or upgrade within the plugin shell. :-\

Well, i have considered moving Nextcloud to platform other than FreeNAS as the plugin seems to be overcomplicating a number of things. However, FreeNAS is the safer way when it comes to data protection and also the combination with pfsense, Letscert certificates and HAProxy works flawless so why would i want to change?
 
Last edited:
Top