Nextcloudpi: after ncp-dist-upgrade backup does not work (root@localhost access denied to DB)

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.11.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Armbian 26.8.3 trixie
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.68-1~deb13u1 arm64
    • Reverse proxy and version _(e.g. nginx 1)
    • None
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • after upgrade from bookworm to trixie
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • NCP
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

[After running ncp-dist-upgrade everything seems to work fine, except the scheduled and manual backup]

Steps to replicate it (hint: details matter!):

  1. Run nextcloud version mentioned above on Armbian bookworm

  2. run ncp-dist-upgrade

  3. Automatic backup not working. Manual gives this output:
    Running nc-backup
    Installing template ‘ncp-metrics.cfg.sh’…
    Cannot load Zend OPcache - it was already loaded
    Cannot load Zend OPcache - it was already loaded
    check free space…
    Cannot load Zend OPcache - it was already loaded
    Cannot load Zend OPcache - it was already loaded
    Maintenance mode enabled
    backup database…
    mysqldump: Got error: 1698: “Access denied for user ‘root’@‘localhost’” when trying to connect
    Abort…

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

{"reqId":"aoq0cI8VauoYzq4As_SCwgAAEQA","level":2,"time":"2026-08-23T08:50:57+00:00","remoteAddr":"192.168.1.233","user":"--","app":"no app in context","method":"POST","url":"/index.php/login","scriptName":"/index.php","message":"Login failed: Susi (Remote IP: 192.168.1.233)","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"32.0.11.1","data":[]}
{"reqId":"aowDJzvjxlmyPWCFuWvQXgAAABQ","level":3,"time":"2026-08-24T08:39:03+00:00","remoteAddr":"192.168.1.222","user":"Norbi","app":"no app in context","method":"MOVE","url":"/remote.php/dav/files/Norbi/Information/FeWo%20Davos/2026/Antrag-WMFonds.pdf","scriptName":"/remote.php","message":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-1cd648fa604e291ddecbd89c50571345' for key 'fs_storage_path_hash'","userAgent":"Mozilla/5.0 (Linux) mirall/33.0.6-20260622.174653.606292d19f-1.0~noble1 (Nextcloud, linuxmint-6.8.0-138-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.11.1","clientReqId":"9e732abb-0f68-4612-9c5d-f2eb77a40b7b","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-1cd648fa604e291ddecbd89c50571345' for key 'fs_storage_path_hash'","Code":1062,"Trace":[{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAdapter.php","line":69,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":310,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":290,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":795,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":647,"function":"moveFromCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":176,"function":"move","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":225,"function":"OC\\Files\\Cache\\{closure}","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":169,"function":"copyOrRenameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":277,"function":"renameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":818,"function":"renameUpdate","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Storage.php","line":327,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":346,"function":"renameOrCopy","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":98,"function":"rename_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":169,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":85,"function":"postRename","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":837,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":439,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/DB/Exceptions/DbalException.php","Line":56,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException","Message":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-1cd648fa604e291ddecbd89c50571345' for key 'fs_storage_path_hash'","Code":1062,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1976,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1918,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1218,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":292,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":467,"function":"executeStatement","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAdapter.php","line":67,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":310,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":290,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":795,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":647,"function":"moveFromCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":176,"function":"move","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":225,"function":"OC\\Files\\Cache\\{closure}","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":169,"function":"copyOrRenameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":277,"function":"renameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":818,"function":"renameUpdate","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Storage.php","line":327,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":346,"function":"renameOrCopy","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":98,"function":"rename_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":169,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":85,"function":"postRename","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":837,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":439,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":64,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-1cd648fa604e291ddecbd89c50571345' for key 'fs_storage_path_hash'","Code":1062,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1212,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":292,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":467,"function":"executeStatement","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAdapter.php","line":67,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":310,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":290,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":795,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":647,"function":"moveFromCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":176,"function":"move","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":225,"function":"OC\\Files\\Cache\\{closure}","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":169,"function":"copyOrRenameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":277,"function":"renameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":818,"function":"renameUpdate","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Storage.php","line":327,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":346,"function":"renameOrCopy","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":98,"function":"rename_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":169,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":85,"function":"postRename","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":837,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":439,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":24,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-1cd648fa604e291ddecbd89c50571345' for key 'fs_storage_path_hash'","Code":"23000","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1212,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php","line":292,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":467,"function":"executeStatement","class":"Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/ConnectionAdapter.php","line":67,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":310,"function":"executeStatement","class":"OC\\DB\\ConnectionAdapter","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/ExtendedQueryBuilder.php","line":290,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":795,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\ExtendedQueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":647,"function":"moveFromCache","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":176,"function":"move","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":225,"function":"OC\\Files\\Cache\\{closure}","class":"OC\\Files\\Cache\\Updater","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Updater.php","line":169,"function":"copyOrRenameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":277,"function":"renameFromStorage","class":"OC\\Files\\Cache\\Updater","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":818,"function":"renameUpdate","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Storage.php","line":327,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":346,"function":"renameOrCopy","class":"OCA\\Files_Versions\\Storage","type":"::"},{"file":"/var/www/nextcloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":98,"function":"rename_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":57,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":220,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":56,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":67,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":79,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":169,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":85,"function":"postRename","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":837,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":439,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}}},"message":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-1cd648fa604e291ddecbd89c50571345' for key 'fs_storage_path_hash'","exception":{"query":"UPDATE `*PREFIX*filecache` SET `path` = :dcValue1, `path_hash` = :dcValue2, `name` = :dcValue3, `parent` = :dcValue4 WHERE (`storage` = :dcValue5) AND (`fileid` = :dcValue6)"},"CustomMessage":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-1cd648fa604e291ddecbd89c50571345' for key 'fs_storage_path_hash'"}}
{"reqId":"nJi2Ksvsji4zHYDeigJP","level":2,"time":"2026-08-25T15:10:04+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","scriptName":"/var/www/nextcloud/cron.php","message":"file_put_contents(/media/NCData/appdata_ocrlfkscpxks/preview/1/1/4/4/2/5/8/161543/1024-1024.png): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#306","userAgent":"--","version":"32.0.11.1","occ_command":["/var/www/nextcloud/cron.php"],"data":{"app":"PHP"}}
{"reqId":"nJi2Ksvsji4zHYDeigJP","level":2,"time":"2026-08-25T15:10:07+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","scriptName":"/var/www/nextcloud/cron.php","message":"file_put_contents(/media/NCData/appdata_ocrlfkscpxks/preview/1/1/4/4/2/5/8/161543/4096-4096-max.png): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#306","userAgent":"--","version":"32.0.11.1","occ_command":["/var/www/nextcloud/cron.php"],"data":{"app":"PHP"}}
{"reqId":"aqlGD3ZDAmKhIPhk6HD3ggAAGA0","level":2,"time":"2026-09-15T13:20:15+00:00","remoteAddr":"192.168.1.233","user":"Susi","app":"PHP","method":"POST","url":"/index.php/apps/bookmarks/bookmark","scriptName":"/index.php","message":"Undefined array key \"basic\" at /var/www/nextcloud/apps/bookmarks/lib/Service/BookmarkService.php#166","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0","version":"32.0.11.1","data":{"app":"PHP"}}
{"reqId":"aqlGD3ZDAmKhIPhk6HD3ggAAGA0","level":2,"time":"2026-09-15T13:20:15+00:00","remoteAddr":"192.168.1.233","user":"Susi","app":"PHP","method":"POST","url":"/index.php/apps/bookmarks/bookmark","scriptName":"/index.php","message":"Trying to access array offset on null at /var/www/nextcloud/apps/bookmarks/lib/Service/BookmarkService.php#166","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0","version":"32.0.11.1","data":{"app":"PHP"}}
{"reqId":"aqqcG3VBC6BA28uxQBBZEQAAAFM","level":3,"time":"2026-09-16T13:39:40+00:00","remoteAddr":"192.168.1.222","user":"Norbi","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/Norbi/","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (Linux) mirall/34.0.3-20260826.113916.7563f574a8-1.0~noble1 (Nextcloud, linuxmint-6.8.0-139-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.11.1","clientReqId":"a79faee1-8782-4636-b927-8b2e9568ec3b","exception":{"Exception":"OCA\\DAV\\Exception\\ServerMaintenanceMode","Message":"Das System befindet sich im Wartungsmodus.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"checkMaintenanceMode","class":"OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","Line":65,"message":"Uncaught exception","exception":{},"CustomMessage":"Uncaught exception"}}
{"reqId":"aqqcOadNh5qqkVLn_37HyQAAAAA","level":3,"time":"2026-09-16T13:40:10+00:00","remoteAddr":"192.168.1.222","user":"Norbi","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/Norbi/","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (Linux) mirall/34.0.3-20260826.113916.7563f574a8-1.0~noble1 (Nextcloud, linuxmint-6.8.0-139-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.11.1","clientReqId":"a6d6b184-8ff6-443e-9211-4226fab3bf5e","exception":{"Exception":"OCA\\DAV\\Exception\\ServerMaintenanceMode","Message":"Das System befindet sich im Wartungsmodus.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"checkMaintenanceMode","class":"OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","Line":65,"message":"Uncaught exception","exception":{},"CustomMessage":"Uncaught exception"}}
{"reqId":"aqqcQXVBC6BA28uxQBBZEwAAAFI","level":3,"time":"2026-09-16T13:40:18+00:00","remoteAddr":"192.168.1.222","user":"Norbi","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/Norbi/","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (Linux) mirall/34.0.3-20260826.113916.7563f574a8-1.0~noble1 (Nextcloud, linuxmint-6.8.0-139-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.11.1","clientReqId":"bd102ac3-f1f1-40c5-b761-af98f80b0671","exception":{"Exception":"OCA\\DAV\\Exception\\ServerMaintenanceMode","Message":"Das System befindet sich im Wartungsmodus.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"checkMaintenanceMode","class":"OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","Line":65,"message":"Uncaught exception","exception":{},"CustomMessage":"Uncaught exception"}}
{"reqId":"aqqexUquYuCuYbtzZLrjuAAAAEM","level":3,"time":"2026-09-16T13:51:01+00:00","remoteAddr":"192.168.1.233","user":"--","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/Susi/","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.30.3","version":"32.0.11.1","exception":{"Exception":"OCA\\DAV\\Exception\\ServerMaintenanceMode","Message":"System is in maintenance mode.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"checkMaintenanceMode","class":"OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","Line":65,"message":"Uncaught exception","exception":{},"CustomMessage":"Uncaught exception"}}
{"reqId":"aqvfUbHRUmv6DsOohZsU_QAAAEs","level":3,"time":"2026-09-17T12:38:41+00:00","remoteAddr":"192.168.1.230","user":"Norbi","app":"no app in context","method":"PROPFIND","url":"/remote.php/dav/files/Norbi/","scriptName":"/remote.php","message":"Uncaught exception","userAgent":"Mozilla/5.0 (Linux) mirall/34.0.3-20260826.113916.7563f574a8-1.0~noble1 (Nextcloud, linuxmint-7.0.0-31-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"32.0.11.1","clientReqId":"98994faf-6482-4ec6-8f09-609b5f942ed6","exception":{"Exception":"OCA\\DAV\\Exception\\ServerMaintenanceMode","Message":"Das System befindet sich im Wartungsmodus.","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"checkMaintenanceMode","class":"OCA\\DAV\\Connector\\Sabre\\MaintenancePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":212,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":427,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":22,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":151,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php","Line":65,"message":"Uncaught exception","exception":{},"CustomMessage":"Uncaught exception"}}

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

No Browser involved

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

No browser, no reverse proxy involved

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '/ijvCf3Wyo3K7zbzTU3MSMgAMWDE0H',
  'secret' => '+C0QLyNgWsFKGXW0xBpm1sj552YmepZMLY/ppgM9xDdoasfS',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    11 => 'x.y.z.a',
    1 => 'x.y.z.a',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.domain.local',
    3 => 'nextcloudpi',
    2 => 'domain.ch',
    4 => 'domain.ch',
    '' => 'domain.ch',
    14 => 'domain.ch',
  ),
  'datadirectory' => '/media/NCData',
  'dbtype' => 'mysql',
  'version' => '32.0.11.1',
  'overwrite.cli.url' => 'https://nextcloudpi/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => 'The same as the mysql password in /root/.my.cnf',
  'installed' => true,
  'instanceid' => 'ocrlfkscpxks',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'A6OXuStW1BKFmCm8TkediqrtvvtrGaaSEW3bVFQuc+I=',
  ),
  'tempdirectory' => '/media/NCData/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'loglevel' => '2',
  'log_type' => 'file',
  'maintenance' => false,
  'logfile' => '/media/NCData/nextcloud.log',
  'theme' => '',
  'data-fingerprint' => 'ad110b666fe68b926f7705844758e7fc',
  'trusted_proxies' => 
  array (
   'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'A6OXuStW1BKFmCm8TkediqrtvvtrGaaSEW3bVFQuc+I=',
  ),
  'tempdirectory' => '/media/NCData/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'loglevel' => '2',
  'log_type' => 'file',
  'maintenance' => false,
  'logfile' => '/media/NCData/nextcloud.log',
  'theme' => '',
  'data-fingerprint' => 'ad110b666fe68b926f7705844758e7fc',
  'trusted_proxies' => 
  array (
    11 => '127.0.0.1',
    12 => '::1',
    13 => 'domain.ch',
    14 => 'x.y.z.a',
    0 => '0.0.0.0',
    1 => '0.0.0.0',
    2 => '0.0.0.0',
  ),
  'overwriteprotocol' => 'https',
  'serverid' => 290,
);

Apps

The output of occ app:list (if possible). Not relevant here.

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

How did you access your device?
ncp doesn’t use root account usually, after activation you have 2x ncp credentials and you probably did setup ssh access / user.

Sorry, but it is NO problem with the access to my device. It is a mysql configuration problem. How the device is accessed is not involved here. ncp does not use root, that’s true and fine with me. But the backup does use the mysql root account, e.g. in the script ncp-backup:

mysqldump -u root --single-transaction nextcloud > “$dbbackup”

The items “nc-backup” and “nc-backup-auto” in the menu system of nextcloudpi don’t work. The mysql root account is used and the access to the database is denied. That is a result of the upgrade from bookworm to trixie offered by the script ncp-dist-upgrade. The script didn’t show any error messages and the usual prompt appeared. This seemed strange to me, but I rebooted the system, nextcloud came up, all apps we use seemed to be working fine.

Checking the configured automatic backup today I noticed no backup was done, at all. So I started digging and found the problem. I have a workaround for now but it is quick and dirty

Sorry, I’m not keen enough, so I would do

  • armbbian-upgrade, boot
  • ncp-config, tools, clear-php-opcache
  • trying to get rid of the op-cache still loaded message
    sudo rm /etc/php/8.3/*/conf.d/20-opcache.ini

*sudo ncp-update-nc 0 until last nc v. 32, boot
*sudo ncp-update-nc 0 until last nc v. 33, boot

Maybe things are corrected.

I use Nextcloud since version 16. So I know it very well. Fortunately, I was responsible for a Zabbix installation at work, so I know mysql well, too.

This seems to be a problem related to the update of mariadb from version 10.x to 11.x

The last lines of the logfile /var/log/ncp-dist-upgrade.log:

Update to Debian 13 (trixie) successful.

is_active_app unattended-upgrades

local ncp_app=unattended-upgrades

local bin_dir=.

local script=./unattended-upgrades.sh

local cfg_file=/usr/local/etc/ncp-config.d/unattended-upgrades.cfg

[[ -f ./unattended-upgrades.sh ]]
++ find /usr/local/bin/ncp -name unattended-upgrades.sh
++ head -1

local script=/usr/local/bin/ncp/UPDATES/unattended-upgrades.sh

[[ -f /usr/local/bin/ncp/UPDATES/unattended-upgrades.sh ]]

unset is_active

source /usr/local/bin/ncp/UPDATES/unattended-upgrades.sh
++ type -t is_active

[[ '' == function ]]

[[ -f /usr/local/etc/ncp-config.d/unattended-upgrades.cfg ]]
++ cat /usr/local/etc/ncp-config.d/unattended-upgrades.cfg

local 'cfg={
"id": "unattended-upgrades",
"name": "Unattended-upgrades",
"title": "unattended-upgrades",
"description": "Automatic installation of security updates. Keep your cloud safe",
"info": "",
"infotitle": "",
"params": [
{
"id": "ACTIVE",
"name": "Active",
"value": "no",
"type": "bool"
},
{
"id": "AUTOREBOOT",
"name": "Autoreboot",
"value": "no",
"type": "bool"
}
]
}'
++ jq -r '.params[0].id'

[[ ACTIVE == \A\C\T\I\V\E ]]
++ jq -r '.params[0].value'

[[ no == \y\e\s ]]

I couldn’t scroll up in the terminal to see the message, that the update was successful. I don’t know why all the last statements executed were written to the terminal.

I see here: Debian 12 to 13 Server Upgrade Guide - Pieter Bakker
for the databases these lines:

Database Servers

MySQL/MariaDB: Run mysql_upgrade after the system upgrade if prompted

PostgreSQL: Check for version-specific upgrade notes

So I don’t know, whether I have to run mysql_upgrade or not. I was not prompted to do so.

Mariadb runs fine, btw:

$ sudo systemctl status -l mariadb

mariadb.service - MariaDB 11.8.6 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
-ncp-delay-automount.conf    Active: active (running) since Wed 2026-09-16 15:59:11 CEST; 1 day 18h ago Invocation: b5c6facbd850462b891f10474bbe48c3 TriggeredBy: * mariadb.socket      Docs: man:mariadbd(8)            
   Process: 2607 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=/usr/bin/galera_recovery`; [ $? -eq 0 ]   && echo _WSREP_START_P>
Process: 2746 ExecStartPre=/bin/sleep 20 (code=exited, status=0/SUCCESS)
Process: 3202 ExecStartPost=/bin/rm -f /run/mysqld/wsrep-start-position /run/mysqld/wsrep-new-cluster (code=exited, status=0/SUCCESS)
Process: 3204 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Main PID: 3183 (mariadbd)
Status: "Taking your SQL requests now..."

Unless the current system runs fine and without problems, I wouldn’t do any update to a later version of nextcloud, e.g. 33.x. I doubt whether this will fix this issue.

Keep in mind your version went eol this month.
NC EOL Versins
Sometimes - you have to jump. :wink:

I am aware of the EOL of my version. It’s not connected to the internet. Because of the pending EOL I tried to update the OS to trixie.

I will update to the next supported nextcloud version as soon as the current version is running without bugs.
I am not against updating and I expected to be safe after ncp reminding me that the ncp-dist-upgrade script is available for more than 45 days = 6 weeks ! There was no update for ncp available during this period of time. Is nobody else doing backups incl. the managed instances by a service provider ?
The upgrade script itself looks fine to me. That’s about the same I would have done manually.

I bet that there will be problems doing an update to any other version because of this unsolved problem.
So I don’t want to break the current instance at all by just experimenting with updates. I can even go back to bookworm and repeat the upgrade but I don’t think anything will change. My backup works with a quick and dirty work-around.
I can’t run mariadb-upgrade because of the problem that root access to the DB is denied. There are no error messages from mariadb except those unsuccessful tries to connect.
Yes, there is a .my.cnf file in the /root directory and it contains a password.

BTW: Armbian update fails with some error messages. The important part is this:

Err:5 https://github.armbian.com/configng` stable InRelease Sub-process /usr/bin/sqv returned an error code (1), error message is: Signing key on DF00FAF1C577104B50BF1D0093D6889F9F0E78D5 is not bound: No binding signature at time 2026-09-12T09:42:26Z because: Policy rejected non-revocation signature (PositiveCertification) requiring second pre-image resistance because: SHA1 is not considered secure since 2026-02-01T00:00:00Z Missing key 8CFA83D13EB2181EEF5843E41EB30FAF236099FE, which is needed to verify signature.`

To fix this problem you have to do the following:

wget https://apt.armbian.com/armbian.key
gpg --dearmor < armbian.key | sudo tee /usr/share/keyrings/armbian.gpg > /dev/null

Hope this helps someone.
My armbian is up to date.

All packages are up to date.

I understand, as long as you find a a way to walk …

You are running ncp v.1.58, are you?

Oh yes, the pain I have forgotten.

There is a main reason why I didn’t want to risk an upgrade of nextcloud. It is very probable that some modifications were made to the DB schema. And that script will run as mysql (mariadb) user root and exactly that didn’t work. It won’t run as the user ncadmin because of security reasons. The user running the productive nextcloud instance in most cases facing the internet does not have the access rights required to update the DB schema. That’s best practice and fine with me.

I was able to discover the cause of the problem and fix it.

The password for DB user root was empty in the mysql.user table but there was a password specified in the /root/.my.cnf file used for connecting to the DB server.

I didn’t test whether simply removing the password from the /root/.my.cnf file would solve the problem but changed the password of root in mysql.user to the one specified in that file.

Now root has access to the DB @ localhost.

I used a combination of mariadbd-safe and this mysql (mariadb) statement “ALTER USER root IDENTIFIED BY ‘password’;”

Of course, stopping nextcloud, (php8.3-fpm, apache2) and mariadb (mariadb, mariadb.socket) was required. After the change I started everything in the right order, again, and now the nightly automatic backup works.
I tested the manual backup after my changes and it worked fine. I saw that the automatic backup script just calls the manual backup script, i.e. there is just one “mysqldump …” call in the manual backup script which I modified before I applied the fix to get a backup, at all.