Nextcloud version (eg, 12.0.2): about button just says “A safe home for all your data” (Which is a bit worrying as it has deleted all my files!
Operating system and version (eg, Ubuntu 17.04): unRAID Docker & Windows 10
Apache or nginx version (eg, Apache 2.4.25): Don’t know
PHP version (eg, 7.1): Don’t know
Hi, all my local files have disappeared, the folders are intact but all the files have gone! I am trying to restore from the trashbin using the webui and it immediately gives the error “Error while restoring files from trashbin” but I can see the counter go down from 9129 files to 8067 before hanging. I can refresh the browser (tried Chrome & Edge) and the same thing will happen albiet the total file count is lower each time.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- no idea, been using for a few weeks and all my files have gone!
The output of your Nextcloud log in Admin > Logging:
{"reqId":"ZsrqZicqvW4IyDr7zcBu","level":4,"time":"2019-08-28T10:00:41+00:00","remoteAddr":"172.18.0.3","user":"mbc0","app":"webdav","method":"MOVE","url":"/remote.php/dav/trashbin/mbc0/trash/Benefits%20Letter.doc.d1566883851","message":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/8070a0951be21f7742cbd5c3da729c9b\" is locked","Code":0,"Trace":[{"file":"/config/www/nextcloud/lib/private/Files/Storage/Common.php","line":715,"function":"acquireLock","class":"OC\\Lock\\DBLockingProvider","type":"->","args":["files/8070a0951be21f7742cbd5c3da729c9b",2]},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":593,"function":"acquireLock","class":"OC\\Files\\Storage\\Common","type":"->","args":["scanner::files_trashbin/versions",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/config/www/nextcloud/lib/private/Files/Cache/Scanner.php","line":331,"function":"acquireLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["scanner::files_trashbin/versions",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Trashbin.php","line":868,"function":"scan","class":"OC\\Files\\Cache\\Scanner","type":"->","args":["files_trashbin/versions"]},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Trashbin.php","line":480,"function":"getVersionsFromTrash","class":"OCA\\Files_Trashbin\\Trashbin","type":"::","args":["Benefits Letter.doc",1566883851,"mbc0"]},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Trashbin.php","line":432,"function":"restoreVersions","class":"OCA\\Files_Trashbin\\Trashbin","type":"::","args":[{"__class__":"OC\\Files\\View"},"/Benefits Letter.doc.d1566883851","Benefits Letter.doc","Benefits Letter.doc","Desktop PC/Documents/Personal/Divorce",1566883851]},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php","line":83,"function":"restore","class":"OCA\\Files_Trashbin\\Trashbin","type":"::","args":["/Benefits Letter.doc.d1566883851","Benefits Letter.doc",1566883851]},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php","line":65,"function":"restoreItem","class":"OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend","type":"->","args":[{"__class__":"OCA\\Files_Trashbin\\Trash\\TrashItem"}]},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Sabre/AbstractTrash.php","line":87,"function":"restoreItem","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->","args":[{"__class__":"OCA\\Files_Trashbin\\Trash\\TrashItem"}]},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Sabre/RestoreFolder.php","line":75,"function":"restore","class":"OCA\\Files_Trashbin\\Sabre\\AbstractTrash","type":"->","args":[]},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":158,"function":"moveInto","class":"OCA\\Files_Trashbin\\Sabre\\RestoreFolder","type":"->","args":["Benefits Letter.doc.d1566883851","trashbin/mbc0/trash/Benefits Letter.doc.d1566883851",{"__class__":"OCA\\Files_Trashbin\\Sabre\\TrashFile"}]},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":642,"function":"move","class":"Sabre\\DAV\\Tree","type":"->","args":["trashbin/mbc0/trash/Benefits Letter.doc.d1566883851","trashbin/mbc0/restore/Benefits Letter.doc.d1566883851"]},{"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://nextcloud.embyserver.co.uk:443/remote.php/dav/trashbin/mbc0/trash/Benefits%20Letter.doc.d1566883851","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/config/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpMove"],[{"absoluteUrl":"https://nextcloud.embyserver.co.uk:443/remote.php/dav/trashbin/mbc0/trash/Benefits%20Letter.doc.d1566883851","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:MOVE",[{"absoluteUrl":"https://nextcloud.embyserver.co.uk:443/remote.php/dav/trashbin/mbc0/trash/Benefits%20Letter.doc.d1566883851","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https://nextcloud.embyserver.co.uk:443/remote.php/dav/trashbin/mbc0/trash/Benefits%20Letter.doc.d1566883851","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/config/www/nextcloud/apps/dav/lib/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/config/www/nextcloud/remote.php","line":163,"args":["/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/config/www/nextcloud/lib/private/Lock/DBLockingProvider.php","Line":209,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36","version":"16.0.3.0","id":"5d665643469cf"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
PASTE HERE<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'instanceid' => 'ocfrseevhqu4',
'trusted_domains' =>
array (
0 => '192.168.0.33:444',
1 =>'nextcloud.(Deleted).co.uk',
2 =>'192.168.11.34',
3 =>'192.168.0.12',
),
'dbtype' => 'mysql',
'version' => '16.0.3.0',
'overwrite.cli.url' => 'https://nextcloud.(Deleted).co.uk',
'overwritehost' => 'nextcloud.(Deleted)co.uk',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => '192.168.0.33:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => '(Deleted)
'installed' => true,
);
The output of your Apache/nginx/system log in /var/log/____
:
2019/08/05 15:13:52 [error] 328#328: *2 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused in /config/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /config/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construc...PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused in /config/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /config/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /config/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)