Upgrade to v0.52 from 0.50 hanging at Nextcloud step

Hi all,
Tried to upgrade this morning from v0.50 to 0.52 and it appears the Nextcloud step is hanging – no activity there for at least 45 minutes or so. It’s not a very big Nextcloud installation at all. The directory /home/user-data/owncloud-backup shows a 307M size from today’s backup and the older owncloud-backup directories are all a little smaller, but of comparable size.

I am kind of surprised to see that it’s upgrading Nextcloud to version 18.0.10, since the release notes refer to Nextcloud v20.0.1 for MiaB v0.51.

What should I do? Cancel out of there with ctrl-c? Try again? Do some other steps manually first? Thanks for any advice.

OK, my lappy lost the SSH connection to box.example.com.
I restarted the upgrade, and it’s still hanging, but on a different (higher) Nextcloud version this time (19.0.4 instead of 18.0.10):

  1. Is this what everyone else went through?
  2. Is it normal for my Nextcloud version on MiaB to be so far behind?

Thanks all!

The 0.51 update upgrades Nextcloud through each version from 17 to 20. When I went from 0.48 to 0.51 it only took a few minutes to complete.

There were some reports of issues with the database for Nextcloud in the forum at the time. Worth searching for as there were solutions available.

Running the MiaB upgrade script repeatedly after it hangs until I got to Nextcloud v20.0.1 appears to have worked! I could see the updates finally being applied with the 20.0.1 version where it was hanging before.

I hope this helps someone else. Thanks for the suggestion @latinhypercube – so far I have not needed to hunt down issues with the Nextcloud database. Here’s the final output of the upgrade script that gives me hope it’s back to working normally:

Updating system packages...
Installing system packages...
Initializing system random number generator...
Firewall is active and enabled on system startup
Installing nsd (DNS server)...
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
bayes: synced databases from journal in 0 seconds: 450 unique entries (541 total entries)
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...
Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to /home/user-data/owncloud-backup/2021-02-01-11:33:59...

Upgrading to Nextcloud version 20.0.1

 

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Updating <accessibility> ...
Migrate old user config

 Done
    1/1 [============================] 100%
Updated <accessibility> to 1.6.0
Updating <calendar> ...
Updated <calendar> to 2.1.2
Updating <contacts> ...
Updated <contacts> to 3.4.1
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.1.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.10.1
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.0.1
Updating <files_rightclick> ...
Updated <files_rightclick> to 0.17.0
Updating <files_videoplayer> ...
Updated <files_videoplayer> to 1.9.0
Updating <logreader> ...
Updated <logreader> to 2.5.0
Updating <photos> ...
Updated <photos> to 1.2.0
Updating <privacy> ...
Updated <privacy> to 1.4.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.10.0
Updating <recommendations> ...
Updated <recommendations> to 0.8.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.10.0
Updating <settings> ...
Updated <settings> to 1.2.0
Updating <support> ...
Updated <support> to 1.3.0
Updating <survey_client> ...
Updated <survey_client> to 1.8.0
Updating <text> ...
Updated <text> to 3.1.0
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.9.0
Updating <updatenotification> ...
Updated <updatenotification> to 1.10.0
Updating <viewer> ...
Updated <viewer> to 1.4.0
Updating <federation> ...
Updated <federation> to 1.10.1
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.8.0
Updating <oauth2> ...
Updated <oauth2> to 1.8.0
Updating <password_policy> ...
Updated <password_policy> to 1.10.1
Updating <files> ...
Updated <files> to 1.15.0
Updating <activity> ...
Updated <activity> to 2.13.2
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.3.0
Updating <dav> ...
Fix broken values of calendar objects
 Done
    0/0 [----->----------------------]   0%
Updated <dav> to 1.16.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.12.0
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.10.1
Updating <files_versions> ...
Updated <files_versions> to 1.13.0
Updating <sharebymail> ...
Updated <sharebymail> to 1.10.0
Updating <workflowengine> ...
Updated <workflowengine> to 2.2.0
Updating <comments> ...
Updated <comments> to 1.10.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.9.0
Updating <notifications> ...
Updated <notifications> to 2.8.0
Updating <systemtags> ...
Updated <systemtags> to 1.10.0
Updating <theming> ...
Updated <theming> to 1.11.0
Checking for update of app accessibility in appstore
Checked for update of app "accessibility" in appstore 
Checking for update of app activity in appstore
Checked for update of app "activity" in appstore 
Checking for update of app calendar in appstore
Update app calendar from appstore
Checked for update of app "calendar" in appstore 
Checking for update of app cloud_federation_api in appstore
Checked for update of app "cloud_federation_api" in appstore 
Checking for update of app comments in appstore
Checked for update of app "comments" in appstore 
Checking for update of app contacts in appstore
Update app contacts from appstore
Checked for update of app "contacts" in appstore 
Checking for update of app contactsinteraction in appstore
Checked for update of app "contactsinteraction" in appstore 
Checking for update of app dav in appstore
Checked for update of app "dav" in appstore 
Checking for update of app federatedfilesharing in appstore
Checked for update of app "federatedfilesharing" in appstore 
Checking for update of app federation in appstore
Checked for update of app "federation" in appstore 
Checking for update of app files in appstore
Checked for update of app "files" in appstore 
Checking for update of app files_pdfviewer in appstore
Checked for update of app "files_pdfviewer" in appstore 
Checking for update of app files_rightclick in appstore
Checked for update of app "files_rightclick" in appstore 
Checking for update of app files_sharing in appstore
Checked for update of app "files_sharing" in appstore 
Checking for update of app files_trashbin in appstore
Checked for update of app "files_trashbin" in appstore 
Checking for update of app files_versions in appstore
Checked for update of app "files_versions" in appstore 
Checking for update of app files_videoplayer in appstore
Checked for update of app "files_videoplayer" in appstore 
Checking for update of app logreader in appstore
Checked for update of app "logreader" in appstore 
Checking for update of app lookup_server_connector in appstore
Checked for update of app "lookup_server_connector" in appstore 
Checking for update of app nextcloud_announcements in appstore
Checked for update of app "nextcloud_announcements" in appstore 
Checking for update of app notifications in appstore
Checked for update of app "notifications" in appstore 
Checking for update of app oauth2 in appstore
Checked for update of app "oauth2" in appstore 
Checking for update of app password_policy in appstore
Checked for update of app "password_policy" in appstore 
Checking for update of app photos in appstore
Checked for update of app "photos" in appstore 
Checking for update of app privacy in appstore
Checked for update of app "privacy" in appstore 
Checking for update of app provisioning_api in appstore
Checked for update of app "provisioning_api" in appstore 
Checking for update of app recommendations in appstore
Checked for update of app "recommendations" in appstore 
Checking for update of app serverinfo in appstore
Checked for update of app "serverinfo" in appstore 
Checking for update of app settings in appstore
Checked for update of app "settings" in appstore 
Checking for update of app sharebymail in appstore
Checked for update of app "sharebymail" in appstore 
Checking for update of app support in appstore
Checked for update of app "support" in appstore 
Checking for update of app survey_client in appstore
Checked for update of app "survey_client" in appstore 
Checking for update of app systemtags in appstore
Checked for update of app "systemtags" in appstore 
Checking for update of app text in appstore
Checked for update of app "text" in appstore 
Checking for update of app theming in appstore
Checked for update of app "theming" in appstore 
Checking for update of app twofactor_backupcodes in appstore
Checked for update of app "twofactor_backupcodes" in appstore 
Checking for update of app updatenotification in appstore
Checked for update of app "updatenotification" in appstore 
Checking for update of app user_external in appstore
Checked for update of app "user_external" in appstore 
Checking for update of app viewer in appstore
Checked for update of app "viewer" in appstore 
Checking for update of app workflowengine in appstore
Checked for update of app "workflowengine" in appstore 
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Done.
All tables already up to date!
Check columns of the comments table.
Adding additional reference_id column to the comments table, this can take some time...
Comments table updated successfully.
Nextcloud is already latest version
photos 1.2.0 disabled
dashboard 7.0.0 disabled
activity 2.13.2 disabled
Installing Z-Push (Exchange/ActiveSync server)...
Installing Mail-in-a-Box system management daemon...
Installing Munin (system monitoring)...
updated DNS: [redacted]]
web updated

-----------------------------------------------

Your Mail-in-a-Box is running.

Please log in to the control panel for further instructions at:

Looks good. Glad it worked for you without further problems.

I was running the same upgrade path (v50 to v52) but was interrupted by a temporary network problem when the upgrade attempted to download a new NextCloud version…

Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to home/user-data/owncloud-backup/2021-02-01-09:10:20...
Upgrading to Nextcloud version 18.0.10
FAILED: wget -O /tmp/nextcloud.zip https://download.nextcloud.com/server/releases/nextcloud-18.0.10.zip
-----------------------------------------
--2021-02-01 09:10:57--  https://download.nextcloud.com/server/releases/nextcloud-18.0.10.zip
Resolving download.nextcloud.com (download.nextcloud.com)... 95.217.64.181,     2a01:4f9:2a:3119::181
Connecting to download.nextcloud.com (download.nextcloud.com)|95.217.64.181|:443... failed:    Connection timed out.
Connecting to download.nextcloud.com (download.nextcloud.com)|2a01:4f9:2a:3119::181|:443...  failed: Network is unreachable.

So I re-ran the upgrade. And failed again at Nextcloud…

Upgrading Nextcloud --- backing up existing installation, configuration, and database to directory to /home/user-data/owncloud-backup/2021-02-01-09:21:59...
Error: near line 1: duplicate column name: entity

Any ideas?

@tkforbes Always ping or try to visit this Nextcloud URL right before going for upgrading … If fails don’t proceed and just wait for a couple of hours and try again.

1 Like

Okay, that’s valid advise for next time, but before I ran the second upgrade attempt, I did ensure that the Nextcloud site could be reached and now I’m wondering about the cause of this “duplicate column name: entity” error that seems to appear in the Nextcloud backup step.

See this thread: https://discourse.mailinabox.email/t/upgrade-from-0-5-to-0-51-error/7217/13 Maybe it helps?

Thank you very much for the advise. I followed the instructions in the linked thread and was able to complete my upgrade.

Now that the upgrades are complete, I am wondering if the directories below /home/user-data/owncloud-backup/ need to be retained. On my system, there is 1.9G of file space that I might reclaim. Space is tight on this virtual private server.

root@box:~# ls -l /home/user-data/owncloud-backup/
total 32
drwxr-xr-x 2 root root 4096 Jun 19  2019 2019-06-19-10:11:24
drwxr-xr-x 3 root root 4096 Aug 12  2019 2019-08-12-15:53:18
drwxr-xr-x 3 root root 4096 Feb 20  2020 2020-02-20-06:03:04
drwxr-xr-x 3 root root 4096 Jun 13  2020 2020-06-13-10:50:20
drwxr-xr-x 3 root root 4096 Feb  1 09:10 2021-02-01-09:10:20
drwxr-xr-x 3 root root 4096 Feb  1 09:22 2021-02-01-09:21:59
drwxr-xr-x 3 root root 4096 Feb  1 09:30 2021-02-01-09:29:58
drwxr-xr-x 3 root root 4096 Feb  1 14:59 2021-02-01-14:59:17

root@box:~# du -hs /home/user-data/owncloud-backup/
1.9G	/home/user-data/owncloud-backup/

They are there in case of a failed upgrade and a need to rollback. Possibly they could be deleted once you are sure all is ok and you don’t want to rerun the install script.

See this discussion: owncloud-backup cleanup #1879

Hi all,
I am getting this:

And I did this when going from 0.50 to 0.51, any ideas?