Nextcloud container doesn't start after restoring from backup

I had an AIO instance running for quite some time. I wanted to change the NEXTCLOUD_DATADIR to an nfs share. I created a backup and that went fine.

I reset my instance, changed the data directory and noodled around but was not happy with the results. I decided to go back to my old setup.

So I reset my instance again and wanted to restore from the backup. Restoring went fine, but the nextcloud container fails to start. Looking at the logs, I’m seeing this over and over again:

              now              
-------------------------------
 2023-04-06 20:43:12.279812+00
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Installing imagemagick via apk...
Enabling Imagick...
Configuring Redis as session handler...
Setting php max children...
Appdata is not present. Did you maybe change the datadir after aio was first started?
See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
In the datadir was found:
total 12
drwxr-x--- 3 www-data root 4096 Apr  6 20:43 .
drwxr-xr-x 1 root     root 4096 Mar 23 13:38 ..
drwxr-x--- 8 www-data root 4096 Mar 21 10:27 _data
-rwxr-x--- 1 www-data root    0 Apr  6 20:20 fingerprint.update
-rwxr-x--- 1 www-data root    0 Apr  6 20:20 skip.update

Looking for the error message, I found this thread. The issue there was missing disk space, but this is not an issue for me.

Any ideas how to fix this?

Hi, what is inside this folder?

drwxr-x---  4 www-data root 4096 Jan 29 15:55 admin
drwxr-x---  7 www-data root 4096 Mar  5 10:58 user1
drwxr-x--- 10 www-data root 4096 Feb 19 11:51 appdata_ocrybdmff32j
-rwxr-x---  1 www-data root    0 Jan 29 15:53 audit.log
drwxr-x---  2 www-data root 4096 Mar 21 09:46 files_external
-rwxr-x---  1 www-data root    0 Mar 21 09:46 index.html
-rwxr-x---  1 www-data root    0 Jan 29 15:53 nextcloud.log
drwxr-x---  7 www-data root 4096 Feb 19 08:43 user2
drwxr-x---  2 www-data root 4096 Mar 21 09:46 tmp

I’ve changed the actual user names to user1 and user2, but otherwise this is the result of ls -l inside _data. All the logs are empty.

Can you move the content of this _data folder one level up (and basically remoce the _data folder)? That should allow the nextcloud container to start…

Ok, container is coming up. I’m hitting

Please use the command line updater because automatic updating is disabled in the config.php.

when accessing the web interface. Let me try that and I’ll report back afterwards.

The link displayed in the web interface is broken: Introduction — Nextcloud latest Administration Manual latest documentation

Looking through the documentation, should it point to Using the occ command — Nextcloud latest Administration Manual latest documentation?

Can send a PR later to fix that.

In any case, the upgrade command listed there, didn’t work for me:

On the host:

$ sudo -u www-data php occ upgrade -v
sudo: php: command not found

Inside the master container:

$ sudo -u www-data php occ upgrade -v
Could not open input file: occ

See What can I do if Nextcloud shows `Update needed`? · nextcloud/all-in-one · Discussion #1787 · GitHub

That worked. Thanks a ton for the support!