Awhile back I started receiving warnings from my OwnCloud clients that my server version is unsupported, and now it won’t work at all; I get “Internal Server Error” when I try to connect through the client or log into the web interface.
I installed the owncloud-official Rock-On a few years back; it appears it’s no longer supported. Is there an easy way to transfer to another Rock-On without losing my data?
Is owncloud-ssl the correct OwnCloud Rock-On to use? Is there a way to trivially transition over to it with my existing data/DB shares?
Yes, as all your data should be stored in one (or more, depending on how you set it up) Rockstor shares and live there independently from the rock-on.
The question of which service to use (OwnCloud vs Nextcloud) is a little more complicated. Personally, I tend to prefer Nextcloud over Owncloud nowadays as it has gotten a lot of community support and you can usually find a lot of documentation / guides / tutorials, etc…
If you were to go the Owncloud route, we would need create a new rock-on for the “new” officially supported docker image (https://hub.docker.com/r/owncloud/server/) but it seems that this image is designed to be used with separate database etc…, which is a currently complex setup to be mirrored in a rock-on (soon to be possible, hopefully).
If you were to go the Nextcloud route, there are several options, as you noticed:
This rock-on was written by a Rockstor user (@martmaiste, I believe) and was an excellent image when he first shared it as it allowed for an easy setup that was secured and all-inclusive (I used it for a while). It seems @martmaiste has kept updating his image (using Nextcloud 16), so it should be good to go. Note that Nextcloud is at version 17 now, and it remains to be investigated whether @martmaiste’s image supports an easy upgrade from within Nextcloud’s UI.
You also have the rock-on that @phillxnet linked to, and this may be the best option for you, actually, as it is very similar (in terms of setup) to the owncloud-official you were using (if my memory is correct as I have not used it myself).
Yes. The database would need to be rebuilt, but there is a way to simply add the shares that currently host your data to the new Nextcloud rock-on, and then tell Nextcloud to “import” these data into its database. After a brief look, I could find a guide that seems quite detailed:
Let us know what you’d prefer to go with, and we can help further from there.
Thanks a lot for letting us know! Is that with using the OwnCloud-official rock-on? @phillxnet, if that is the case, should we put a warning in this rock-on’s description (and/or take steps to remove it)?
Yes, or update it with a compatible image. I’m game to upload what others deem appropriate. I’m just not up on the various intercompatibilities re db structure, expected volumes and the like. We don’t really want old Rock-ons hanging around but if we can move them to something more recent we help with those re-installing, updating etc.
Well, although the current (deprecated image) now recommends to use the “other” official owncloud image (https://hub.docker.com/r/owncloud/server), the latter doesn’t seem to be usable as a simple drop-in replacement as it appears to need database etc… containers:
This ownCloud image is designed to work with a data volume in the host filesystem and with separate MariaDB and Redis containers.
That sounds like a good one to go with, then. Going through the README on the Git link, I’m looking at Step 3:
Create required shares:
also a share for rock-ons
I’ve already got a rockons-root share (20GB, of which only 21MB is in use), and I’m guessing I should be able to use my existing owncloud-data share (932GB, 638GB used) in place of nextcloud-data?
I’m guessing I should size nextcloud-db similarly to my existing mariadb-data pool (5GB, 1.18GB used), but there are no recommendations for sizing nextcloud-config and nextcloud-apps. Maybe it’s a moot point anyway (I note at the top of the page there’s a notification stating “Share size enforcement is temporarily disabled due to incomplete support in BTRFS”), but any recommendation for what size those two new shares should be? I’ve got plenty of space; would 1GB each be good, not enough, too much?
Thanks. At a glance it looks like the rsync part of the guide is probably unnecessary in my case; I should be able to reuse the existing owncloud-data share, right? So it looks like I’d just go straight to the sudo -u www-data php console.php files:scan --all instruction; does that sound right?
The reason I was thinking this may be the best option for you is that it is the closest to the owncloud-official rock-on you are already running. As a result, there’s no absolute need to create all the shares you listed (-config, -db, -apps, -data). Indeed, the Nextcloud official only uses a single share for all that. You can thus create a single share (named nextcloud-main, for instance) and use it during the rock-on install.
For the rock-on install, you can look at the file in the Github PR linked above; for convenience, I placed a ready-to-use version of it on Github as a gist:
In case you’re unsure how to use it, @phillxnet wrote detailed instructions on how to test a rock-on that you can simply use to install it (until the PR gets merged):
Coming back to the matter of shares, I personally would create a main one (as mentioned above) and install the nextcloud-official rock-on in it. Once installed:
go to the webUI and finish the initial setup process (mainly creating an admin account).
Turn off the rock-on and use the “Add Storage” feature to add your share with the data you want being added to Nextcloud. (See Rockstor documentation if needed).
Turn the rock-on back on and you should now be able to follow the instructions for mass import I linked above.
For how to do step 3, it actually depends on how your data were organized (structured, and the number of users, for instance). It actually also dictates how step 2 should be done actually, as the data structure needs to fit what Nextcloud is expecting. For instance, I would first login to Nextcloud webUI as admin, and create users for all the users you need, then log-out and log-in with each user. This will “initialize” each account (creating corresponding data folders etc…). For instance, creating a user account Testuser will create a folder /var/www/html/data/Testuser that contains:
www-data@d1925d28cc52:~/html/data/Testuser$ ls -lhtr
drwxr-xr-x 1 www-data www-data 0 Oct 5 08:19 cache
drwxr-xr-x 1 root root 50 Oct 5 08:41 files
This files subfolder is where all the files for this user need to be. This is thus the path I would first try to add as a storage (step 2 above).
Correct. Adding your previous data share as in step 2 above will be enough. Note, however, that the tutorial linked relates to a “full” installation and not one in a docker container. In our case, you will need to first “enter” the container before running the commands. In addition, you will need to do so under the www-data user. This would thus translate into:
Thanks, Flox. Here’s where I’m having a little bit of trouble:
The files are located in [owncloud-data root]/data/thad/files. Nextcloud expects them in /var/www/html/data/thad/files. I tried adding the owncloud-data share at /opt/owncloud-data and then symlinking /var/www/html/data/thad/files to /opt/owncloud-data/data/thad/files, but then when I run php console.php files:scan --all I get Exception during scan: Following symlinks is not allowed. So I guess the symlink method is out.
Should I just remove (or rename) /var/www/html and symlink var/www/html to the root of the owncloud-data share? It looks like if I’m going to do that, I’ll need to stop the web service (as if I try to rename /var/www/html, I get Device or resource busy). Is that what I want to do, and if so, how do I stop the service?
I have to run out, but very quickly: no need to move your data to /opt or do any symlink. The “Add Storage” feature I mentioned (and for which I linked the related documentation section) will bind this share as a volume to the nextcloud container, which will see it with the path you select. For instance:
Replace test_share03 above with the share containing your data, and nextcloud will see this share as the path you specify (var/www/html/data/thad/files in your case).
See a brief demonstration below:
The share, owncloud-data, doesn’t just contain the shared files from my Owncloud installation; it’s the entire hierarchy of my old Owncloud site – the equivalent of the /var/www/html directory on the new Nextcloud container, not /var/www/html/data/thad/files. So if I add the owncloud-data share at /var/www/html/data/thad/files, then the files in that directory will be the root owncloud site files (apps, config, console.php, core, etc.) and the files I want will be under /var/www/html/data/thad/files/data/thad/files.
I could always just delete or move the old owncloud hierarchy and move data/thad/files to the root of the share, but I’m wondering if there’s a more elegant way of doing this. (And if I’m going to start making destructive changes to my shares, I’d better double-check that my snapshots are working and up-to-date first.) Is there a way to map /data/thad/files on the owncloud-data share to /var/www/html/data/thad/files in the Nextcloud container without changing the file hierarchy on the owncloud-data share? Let me know if you have any ideas; thanks.
You are correct, I forgot about the previous share’s structure.
It may end up being the simplest way to do so, unless of course somebody else has a better idea. Moving files should be relatively safe but I would always recommend a backup (it’s always recommended after all) before doing so.
For the moment, this is not possible using the rock-on framework; you can do that by running the container more manually (using docker run on the cli). This is something that I remember being brought up a couple of times already in the forum/repo (even though I can’t seem to find said references currently), so it is something that may be implemented in the future.
I apologize for the confusion I may have brought with my previous message.
Okay, so I’ve rearranged files in the owncloud-data share and I’m planning on mounting it at /var/www/html/data in the Nextcloud installation.
But there’s a problem: I already added the owncloud-data share to the Nextcloud-Official container; it’s mapped to /opt/owncloud-data. I see a button for “Add Storage” but nothing to remove an existing mapping. How can I remove owncloud-data from its current mapping at /opt/owncloud-data so I can map it to /var/www/html/data instead?
ETA: I’d still be interested in hearing whether there’s an answer to this, but it occurred to me that there was no reason I couldn’t just remove and reinstall Nextcloud-Official since it was a fresh install anyway. I uninstalled the Rock-on and then reinstalled it and added the owncloud-data share afterward. I’m running the files:scan operation now; I’ll let you know how it goes.
That’s what I would have had to recommend you anyway . I’m glad you’re moving forward on this.
You’ve hit another point that is scheduled to be implemented as it has been brought up a few times. It would be limited to the shares that were added post-install (through the “Add Storage” feature) as those defined in the rock-on definition should be considered required, but otherwise yes, it’s something that would be quite beneficial.
Here’s a link to the corresponding Github issue:
I myself am planning on attacking these kind of issues in the future, but as I’m currently trying to focus on helping with the openSUSE rebase (see this post from @phillxnet and others in that thread and others), it might probably be in a little while.