Update to Nextcloud 13.0.4 doesn't work - No access to my data

Please help! My NextCloud doesn’t work anymore but I need it!
I read the hints in this article but I’m a linux and nextcloud-newbie and don’t know what to do anymore.

I get this error after starting “upgrade” in the front-end-gui:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘UPDATE oc_appconfig SET configvalue = ? WHERE (appid = ?) AND (configkey = ?) AND (configvalue <> ?)’ with params [0, “core”, “lastupdatedat”, 0]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

_ Reperaturwarnung:Unable to clear the frontend cache_

I can’t do anything else with the system and have no access to my data.

Operating system : NextcloudPi Version 0.56.21 // Debian Linux 9
Hardware: Rock 64 with 4 GB RAM

Updated from an older Nextcloud/ownCloud or fresh install: Fresh install

Where did you install Nextcloud from: Rock64-Image

Here the Summary from NextcloudPi:

NextCloudPi version v0.56.21
NextCloudPi image NextCloudPlus_05-10-18
distribution Debian GNU/Linux 9 \n \l
automount yes
USB devices sda
datadir /media/USBdrive/ncdata
data in SD no
data filesystem btrfs
data disk usage 120G/932G
rootfs usage 4.0G/57G
swapfile /var/swap
Nextcloud check ok
Nextcloud version
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 open
port check 443 open
interface eth0
certificates nextcloud.XXX.com
NAT loopback no
uptime 1min

Did you do it with the NextcloudPi interface? It seems that your database didn’t keep the connection open long enough. I’m no sure if you can execute the ugprade command from terminal…

If you did it through ncp-web there will be a backup that you can restore but I don’t think so because it is supposed to auto-rollback if something fails

You used the Nextcloud updater, right?