Updating Nextcloud

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Updating Nextcloud

Postby buttshill » Dec 28th, '19, 11:33

Hi,
I followed the procedure fro installing Nextcloud and have been using it successfully for a while now.
My question is : Is it possible to use the Auto update function of Nextcloud somehow?
The official Mageia version is 15.xx, whereas the latest version is 17.xx. I understand that there be significant work to produce the update pacakges, but from a working version, how can I keep up to date?

Thanks
Last edited by isadora on Dec 28th, '19, 12:18, edited 1 time in total.
Reason: Topic moved into appropriate sub-forum.
buttshill
 
Posts: 2
Joined: Jun 8th, '19, 09:43

Re: Updating Nextcloud

Postby xboxboy » Dec 30th, '19, 03:10

Hi Buttshill,
interesting question, as web apps complicate things significantly: Here's a bit of a TLDR, skip to bottom for answer:

I messed around with the 'packaged' version of some web apps, and got caught out, luckily not badly, but enough to learn about them and how to get around it.

I got caught with joomla (a web site CMS), just a local one for my small business for my staff, it was all ok, then I updated from one version of Mageia to the newer, and it broke my joomla site, IIRC it went from version 1.5XXX to 2.0XXX, and of course my data wouldn't work with the new joomla version: That's not 100% mageia's fault, I doubt I read the release notes, and I didn't have a manual back up.

Now that's another point: Web app back ups!!!!! There's usually 3 (yes three) directories/data sets you need to back up, and usually NONE ARE PART OF /HOME. These are:
1: The web app itself eg /var/www/html/webapp
2: The directory the web app uses for data storage eg /usr/share/www/webapp
3: The database info, that has to be 'dumped' into a file using the correct command, google is your friend here, I use mariadb (mysqld equivilent) and theres a billion tutorials about how to perform the dump

And there may also be some configs to copy also, these can be a nightmare to rebuild, so back them up:
In my case there is /etc/webapp and /etc/www/config , or it's something like that, I'm not in front of my server now.

So, what I should have done is backed all that up, then performed the update, if it failed, i could have then messed around trying to sort it out..... But given the data wasn't really important I just moved on.

Then I found myself in an owncloud position like yourself. This was on my raspberry pi (no mageia image at the time) so I used Fedora (nice, but no Mandrake successor). And owncloud was their package at the time (like version 8 or something). Incidentally this is a good read https://www.happyassassin.net/2015/08/2 ... -packages/, basically web apps suck for packaging....

So I can't remember what happened, but I think one of my other systems had the owncloud/nextcloud client updated, and then it wouldn't talk to the 'old' owncloud server.... blast... I talked on IRC to the fedora boys a bit, but basically they didn't know when the update was coming... What to do, what to do...

So I dug deep and wasted hours upon hours of my life.... What I did was I did that whole back up thing. I then 'exempted' owncloud packages from being updated via the DNF config file. I then went on a deep dive learning how to 'update' owncloud manually: ie: shutdown apache, move the old web app to a backup directory, download and extract the new version of owncloud, move into place, perform the 'occ update' commands, restart apache. It was a bit more messy than that as I had to link in the existing config.php etc, but I managed to update it through several versions without it breaking... Was so proud of myself.
Then the whole open source/financer issue blew up: The devs left owncloud and started nextcloud... so I migrated over.. And that worked. I did several manual updates also over time. Somewhere through that I had about 4 SD cards die in my pi, so I ended up with a nice clean install of fedora with no dodgy DNF exemptions being worked around.
Then somewhere along the line, the nextcloud devs stepped up to a whole new level and introduced the 'web based' updater. What a revolution. Log in as maintainer/root/authority, go to settings, click web based updater and it's done!! Not quite, but after all the CLI rot I was used to, it works perfectly (most of the time, the early ones were a bit iffy, but now it hasn't failed on me in a long time).

-----Answer below------
From my experience, I sincerely DO NOT recommend using packaged web apps. Not magiea's fault, not the web apps fault, it is just a complex task.

So here's what I recommend: In MY order of recommendation:
1: Learn (really just follow a tutorial, or post here/irc and you'll get the help you need, but it may take some time) how to install the web app manually ie: Download the web app from it's website/github. Extract and install it, install it's dependencies via the package manager though ie. use urpmi/dnf to install apache, php etc etc, but the actual app, download that manually. Then learn how to update it manually. Most apps are pretty straight forward to update now, one of mine I have to download the update, drop it in a directory, then go to the web apps page as admin and it will find it and apply it. Nextcloud can do it from the web page, or cli if you just want to do it that way.

2: You could probably do what I did initially with my owncloud install. Use urpmi to install the server, then exempt it from updates, then manually manage it yourself. While that makes it easy to install all the dependencies, learning where the links are for the config.php etc can be a bloody pain, and I remember with fedora that took a few hours of messing around to learn where their packagers think stuff should be put eg config.php is put in /etc/owncloud/config.php, while where config.php normally is has a link over to the actual file.

3: Use a specific VM for that task. I haven't used it, but there are projects like https://ownyourbits.com/nextcloudpi/ that build a great eco system around the app, and that's all it does.

So if I understand correctly, you currently have version 15 installed from the repos via urpmi? Then NO, DO NOT use the update function in nextcloud, that will cause merry hell when the package maintainer pushes the updated version (although, I just had a thought, there may be an updated version in backports?? Have you checked??? But I would advise against that for reasons above). If this is the case I would exempt nextcloud from urmpi updates, THEN you can use the update function in nextcloud.

But back up, backup, back up.
xboxboy
 
Posts: 326
Joined: Jun 2nd, '13, 06:41

Re: Updating Nextcloud

Postby buttshill » Dec 30th, '19, 17:02

Hi
Many thanks for your response.
I tried updating using the Cauldron rpms, but they have issues with outstanding functionalities.
I will spend a little time trying to learn about a manual installation, but I guess my main question was why was the auto-updater disabled and can it be enabled. However, in the meantime I am happy to wait for official updates.

thanks
buttshill
 
Posts: 2
Joined: Jun 8th, '19, 09:43

Re: Updating Nextcloud

Postby xboxboy » Jan 1st, '20, 07:31

Ah, I see. That's good work by the packager if they have disabled the in-app update, because using the in-app updater would mess things right up if you update via the app, then the package system attempts an update over that.

So, I guess what I'd be trying to do is exempt the nextcloud server from updates. The wiki may show how to do that, or ask back here, someone will know. It will simply mean editing the urpmi config file.
Then 'removing' the current nextcloud install, and placing the manually downloaded version in there (note, you'll have to check what version you can update to from the packaged one, IIRC you can only skip minor versions, not full integers), then performing the update via cli (very easy, again, ask here, I can probably walk you through it: Note, I am currently moving so my internet access is not real good ATM). Once the manually installed version is 'installed' from there on out you should be able to just use the in-app updater.

Or, I guess you could back up the database and data directory, then uninstall nextcloud server via urpmi, then drop the manually installed version in, and drop your data directory and database into that... Could get messy, although, if you used the 'exact' same version as currently installed, then updated from that you should be ok.

Ah, the beauty of linux: You can do anything. Often there's many, many ways, some better than others... But it can always be done.
xboxboy
 
Posts: 326
Joined: Jun 2nd, '13, 06:41

Re: Updating Nextcloud

Postby wintpe » Jan 10th, '20, 00:50

i also use nextcloud, but when the nextcloud system comes from packages inside the current os i would not recomend trying to upgrade outside the package manager whatever system the os is using unless you are willing to install and set it up in its own sandbox, chroot, or other virtualised environment.
thats just zn os update problem waiting to blow up in your face.

if you want latest and greatest my personal recomendation is us virtualbox and import univention nextcloud

this is a full nextcloud env with little else, and an os to support it.

thats what i use to share files with friends, it even includes a letsencrypt client so you can have a certificated https session externaly assuming you have a domainname static address ect.

and its simply a full black box vm.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1200
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Updating Nextcloud

Postby morgano » Jan 15th, '20, 01:36

Hi guys.
Nice inputs above :)

A couple years ago i used OwnCloud and Nextcloud and wrote https://wiki.mageia.org/en/OwnCloud
I did experiment a bit with https://wiki.mageia.org/en/OwnCloud#Fac ... uto_update

Please if you have the time and energy, use that page plus your knowledge to create a cleaned and updated https://wiki.mageia.org/en/Nextcloud

Best Regards
/Morgan
Mandriva since 2006, then Mageia since 2011 at home & work. Thinkpad T42p T43 T60 T61 T400. Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC, CAD
morgano
 
Posts: 601
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron