Nextcloud From Core to Scale

Smokie

Explorer
Joined
Oct 10, 2014
Messages
67
Hi everyone and I apologise f this has already been discussed. I find myself in a bit of a predicament. I have Nextcloud running on my Core server but have not used it in months due to moving house. Now my nextclou instance on Core will not run or update due to an error stating that I can't jump major versions or something similar. This happened ever since the latest Trueness update.
Anyway I have just installed the Nexcloud app on my new Scale server and am looking for a way to backup my instance from Core and load it onto Scale. IS this possible? Can it be done by commands in the trueness shell? "ie" copy data to the IP and path of my new scale server?

Also not related but someone with more experience might know... The nextcloud app I installed on Scale, So do all the apps use the same IP as the server? Or can I manually change the IP addresses? My server IP is 192.168.1.16 and the Nextcloud and Collabora install both launch with the same IP using different ports.

Thanks in advance
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
That's how it works on SCALE. If I understand things correctly you need to set up an ingress proxy for SSL and different host names for different applications. Exactly why I prefer jails on CORE over this docker stuff.
 

Smokie

Explorer
Joined
Oct 10, 2014
Messages
67
That's how it works on SCALE. If I understand things correctly you need to set up an ingress proxy for SSL and different host names for different applications. Exactly why I prefer jails on CORE over this docker stuff.
ahhh not what I wanted to hear lol... I love Core but I decided to build a Scale server for the bigger selection of apps... Core is very limited..
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can run in jails or VMs whatever you like. I don't experience any limit in what CORE can run.
 

Smokie

Explorer
Joined
Oct 10, 2014
Messages
67
You can run in jails or VMs whatever you like. I don't experience any limit in what CORE can run.
Maybe I should of just stuck with another Core server.. My first one was very limited with hardware. This server is a lot more beefy in every sense..
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
It depends on how you installed nextcloud on Core. If you used the plugin, well, good luck.
The alternative is using @danb35's script. (way way better)

On Scale, the only way to migrate your data currently is to copy the user file to a dataset on your Scale instance eg:
Code:
/mnt/poolname/nextcloud/files
and then setting the mount point for UserDataFiles in the nextcloud install to use that directory. (The app needs to be installed without mounting to begin with. Then, once it is up and running, click edit and mount the user data. It will redeploy. Doing this without first installing with defaults fails to deploy in my case)

You will have to setup usernames exactly the same as in Core, then using the pod shell, enter the command
Code:
./occ files:scan --all
to index the folders to their users. Or create new users and rename the corresponding folders to the usernames you created using FileZilla or something similar. (Make sure to run the files:scan command)

Ideally you want to be able to completely destroy your jail/container and be able to rebuild it without losing any config or data. This is possible with the script mentioned above, but I have not found a way to do this with Scale.
I have built and rebuilt the nextcloud app many times, with and without the mount points of data, config, and userdata and the only way to rebuild it and have it actually work is either a completely new dataset, or only mounting the user files, creating the users in the new instance, and rescanning the files. (Making sure to install it with default first, then editing the mount points once it is running)

It might still be a good idea to mount the data, user files, and config outside anyway so you have a backup, and when you need to rebuild the app, just use a new dataset. This way you will still have your files in the old dataset, and the app will properly install in the new (empty) dataset.
 
Last edited:

victort

Guru
Joined
Dec 31, 2021
Messages
973
It depends on how you installed nextcloud on Core. If you used the plugin, well, good luck.
The alternative is using @danb35's script. (way way better)

On Scale, the only way to migrate your data currently is to copy the user file to a dataset on your Scale instance eg:
Code:
/mnt/poolname/nextcloud/files
and then setting the mount point for UserDataFiles in the nextcloud install to use that directory.

You will have to setup usernames exactly the same as in Core, then using the pod shell, enter the command
Code:
./occ files:scan --all
to index the folders to their users. Or create new users and rename the corresponding folders to the usernames you created using FileZilla or something similar.

Ideally you want to be able to completely destroy your jail/container and be able to rebuild it without losing any config or data. This is possible with the script mentioned above, but I have not found a way to do this with Scale.
I have built and rebuilt the nextcloud app many times, with and without the mount points of data, config, and userdata and the only way to rebuild it and have it actually work is either a completely new dataset, or only mounting the user files, creating the users in the new instance, and rescanning the files.

It might still be a good idea to mount the data, user files, and config outside anyway so you have a backup, and when you need to rebuild the app, just use a new dataset. This way you will still have your files in the old dataset, and the app will properly install in the new (empty) dataset.
I haven’t found a way to mount the db in the Truechart version, but the official version lets you also mount the db outside.

I will have to do some more testing with the official version of Nextcloud.

Being two different operating systems, it might be better to just retain the user files, and rebuild the app from scratch. Making sure of course that you have proper backups of important app such as passwords.

edit: After some initial testing, the official version lets you pick up where you left of as long as you have mounted the Data volume and the DB volume. Even after deleting the app, reinstalling with the proper Data and DB mount points, it just picks up where you left off.
 
Last edited:

listhor

Contributor
Joined
Mar 2, 2020
Messages
133

victort

Guru
Joined
Dec 31, 2021
Messages
973
If db is migrated, do you still need to setup users once again?
Probably not. But I can’t confirm the mount points for the database.

This is just what i I have done, and has worked for me currently.
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
@victor1597 have you noticed any difference in Nextcloud's performance, between scripted installation in jail and Scale's app?
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
@victor1597 have you noticed any difference in Nextcloud's performance, between scripted installation in jail and Scale's app?
I havent given it that much time. I've only switched recently. And my Scale server has more RAM.

To be honest I'll probably stick with my jail for now, as I have 10+ users and a fair bit of data. I'm using the jail as my main, and Scale as my testing nextcloud instance for now, until I have a better idea of how to mount everything properly. Maybe someone could write a script to install it in a custom docker container with mount points and everything.

I don’t want to move all of my data until I have a better handle on the mount points so I can rebuild the app without having to go through the trouble of renaming folders and creating new users etc…

I sure wish someone more experienced could provide the mount point for the db.
 
Top