Broke my NC with a major update

Hi there,

Firstly I’m just gonna apologise to anyone reading this who will no doubt be facepalming in no time.

I’ve had a look around but can’t find any particular solution to the problem below (although that could also be my level of uselessness).

So the issue I’m having is;

I had a running Nextcloud instance on my TrueNAS Scale, from memory V27.x.x. In an effort to maintain my stuff, I hit the update button and as sometimes happens it started to hang on deployment. After about an hour of holding out hope, I decided to roll back the instance.

This failed for some reason, so I was left with the option of upgrading the instance.

Low and behold the new 29.x.x instance doesn’t want to work because apparently the system doesn’t like performing major upgrades. But I also can’t see how to reinstall the older v27.x.x any more.

So now I have a file structure (pool and associated data sets) which used to be linked to my nextcloud, but no running NC instance to access it/link it etc etc… The data in there is kinda critical (luckily backed up on a few computers so nothing is lost). I have deleted and reinstalled NC a couple of times, and directed it back to the same data sets as the original instance in the hopes that it “just works”. But no luck, it just takes me to an update screen through the NC webportal, which then tells me I can’t do the major upgrade from 27 to 29.

Any help would be very much appreciated!
Jonny.

Hello @SirNoob and welcome to the communityforum of NC

first of all you gained yourself an award. tadaaa :tada:
You have made up the funniest username of the day! :joy: :joy: :joy:

Let’s have a :beer: or better more :beers: on it :partying_face:

after that I think your world doesn’t look any dark still… right?

Sadly enough you really didn’t provide too much information about the problematic server. So all I (and everybody else) can do here is just guessing.

right! But you could do 27 → 28 → 29. That’s the intended way of upgrading— no skipping major versions, I’m afraid
But first of all you better should update to the latest point-release of NC which is 27.1.10 at this moment. If your webupdater doesn’t support that (for which reason ever) please start the updatingprocess from the bash using

$ sudo -u www-data php ./occ upgrade

and/or look at this very helpful manual-page

strangely enough you seem to be unable to run a restore from your latest backup. I dunno why. But it would be best to restore the latest backup first and start again from a running nextcloud. Pls check your backuproutine on how to restore backups. And have a look here at the nc-manual on how to restoring backups (you see I like the NC-manual)

I’m pretty sure you would get much further with those hints!
Good luck!

Thanks so much for your reply, and I’m glad you like my handle Mr President.

Apologies for not being able to supply the information that would no doubt be helpful. I’ll see if I can describe what I did to get where I am;

Step 1. Attempt to upgrade from 27.x.x
Step 2. Become impatient and kill the upgrade after it hung for ages
Step 3. Attempt to roll back using the truenas roll back button in the app install icon
Step 4. That also hung, so instead hit the upgrade button
Step 5. That didn’t work
Step 6. Hit the roll back button again, but get a warning saying there was no other version available (or something to that affect)
Step 7. Completely remove and reinstall NC app.
Step 8. Launch that, it works, however because I have gone from 27 - 29 it has had a bit of a hissy fit and doesn’t want to let me upgrade that far in one jump.
Step 9. There seems to be no way to reinstall 27.

I’ve just tried rolling back the data set using a snap shot from yesterday. I had assumed that that might fix it (sadly it doesn’t seem to have).

So my current thinking is;

Option 1. Delete the ix-applications folder which is a child in the Dataset that contains my NC files then reinstall the latest version of NC, presuming that with the ix-application folder having been deleted, my NC won’t remember which version was previously installed.

or

Option A. Nuke the data pool completely and rebuild it.
Seem drastic, but could be done as I have all the critical data backed up to a few other computers. The only thing that would be a genuine pain to rebuild is my password manager.

Thanks again for your help!

I didn’t understand everything. But if your Nextcloud is just a data tomb and you tend to use other applications and also no shares, you can proceed as follows.

For example, you can install Nextcloud 29, create a user and copy or move the files back to e.g. /path/to/nextcloud/data/username.

In order for Nextcloud to recognize the files, you must execute the following:

sudo -u www-data php /path/to/nextcloud/occ files:scan --all

documentation

another hint for updating NC on TrueNas… and I say that with teares in my eyes:
I think it’s way easier to find someone having installed (and solved problems) with NC in a truenas-forum than vice versa. of course here are some ppl running truenas as a basis but I think there are more possible helpers on the other side.

So if you decide going there for help that’s understandable. And I would only like to ask you if you would post the link to the discussion there as an answer here… - thank you