Problem restoring files

8.2.x
help

#1

Hi,
unfortunately one of my pc was infected by cryptolocker that crypted almost all .doc,.xls files on owncloud folder.
So I was using the restore function of owncloud to restore all files that cryptolocker "deleted" (because it renames the original file).

I should restore more or less 2200 files. I tried to check all files in the owncloud web ui and do restore. It doesn't work! :expressionless:
So I tried to restore 5-10 files at time. Doing that I've some problems:

  1. the ui after the restore became unusable and checkboxes disappears from each file. So every time I've to realod the web page.
  2. Sometimes I've to do the restore many times for the same file before it is correctly restored
  3. I've some errors in the logs:
    Exception: {"Exception":"OCP\Lock\LockedException","Message":" \"scanner::d3720e2213aa8618ce913a873309589b\" is locked","Code":0,"Trace":"#0 \/var\/www\/html\/owncloud\/lib\/private\/files\/cache\/scanner.php(264): OC\Lock\DBLockingProvider->acquireLock('scanner::d3720e...', 2)\n#1 \/var\/www\/html\/owncloud\/apps\/files_trashbin\/lib\/trashbin.php(764): OC\Files\Cache\Scanner->scan('files_trashbin\/...')\n#2 \/var\/www\/html\/owncloud\/apps\/files_trashbin\/lib\/trashbin.php(436): OCA\Files_Trashbin\Trashbin::getVersionsFromTrash('FATTURA 31 BORG...', '1479776953', 'bluenergy')\n#3 \/var\/www\/html\/owncloud\/apps\/files_trashbin\/lib\/trashbin.php(388): OCA\Files_Trashbin\Trashbin::restoreVersions(Object(OC\Files\View), '\/\/FATTURA 31 BO...', 'FATTURA 31 BORG...', 'FATTURA 31 BORG...', 'FATTURE e DDT\/F...', '1479776953')\n#4 \/var\/www\/html\/owncloud\/apps\/files_trashbin\/ajax\/undelete.php(72): OCA\Files_Trashbin\Trashbin::restore('\/\/FATTURA 31 BO...', 'FATTURA 31 BORG...', '1479776953')\n#5 \/var\/www\/html\/owncloud\/lib\/private\/route\/route.php(154) : runtime-created function(1): require_once('\/var\/www\/html\/o...')\n#6 [internal function]: _lambdafunc(Array)\n#7 \/var\/www\/html\/owncloud\/lib\/private\/route\/router.php(291): call_user_func('?lambda_204', Array)\n#8 \/var\/www\/html\/owncloud\/lib\/base.php(853): OC\Route\Router->match('\/apps\/files_tra...')\n#9 \/var\/www\/html\/owncloud\/index.php(39): OC::handleRequest()\n#10 {main}","File":"\/var\/www\/html\/owncloud\/lib\/private\/lock\/dblockingprovider.php","Line":183} 2016-11-22T17:29:45+00:00
    Error trashbin can't restore FATTURA 41 .xls 2016-11-22T17:28:48+00:00
    Error files_trashbin trash bin database inconsistent!

Anyway it's strange because even if I've errors the restore happens correclty.
Of course restoring files in this way will takes years :smile: Do you have some suggestion to solve the problem?

My owncloud version is 8.2.7 (stable).

Thanks


#2

This app was only made to restore single files. I didn't find the feature request (not sure if there is any) to add a function to restore all files of a folder to be before a given date (if you don't find it either, make a new feature request on github.com/owncloud/core/issues).

So for your case it would probably be faster to make a full restore of a backup (if you have).

Regarding the file-locking issues, have a look at the FAQ: https://central.owncloud.org/t/file-is-locked-how-to-unlock/985

Also the current version of owncloud is 8.2.9. But before you run updates or do anything else, backup all you have in the current status. There are background processes running all the time and you want to avoid that they delete some old versions by accident.


#3

Thanks for your reply. Well, right now in Owncloud you can select all deleted files and restore them from the ui. The problem is that is doesn't work, maybe due to errors I posted.

I got you about the lock exception. But what about the error:

Error trashbin can't restore FATTURA 41 .xls 2016-11-22T17:28:48+00:00
Error files_trashbin trash bin database inconsistent!

And above all, because I've this error but I'm able to restore the file though?

There is a way to run something that can fix these errors?

Thanks


#4

Hi,

just report a new bug to https://github.com/owncloud/core/issues