'Nextcloud - recover entire trashbin

I have a nextcloud instance running, and some user has performed a delete of a subdirectory. We're having some issues with the restore of the backup, so we're trying to recover the files from the trashbin. Considering the number of deleted files (~25000), the proccess is going to take a lot of time, as we have to recover manually by batchs of files. Is there any way to do this? f.i. with some occ command? I've been looking into the documentation, but I can't find anything. I'm using the following software versions:

  • Nextcloud 21.0.3
  • Centos 7
  • apache 2.4.6
  • php 7.3.29

Thanks for your attention. Best regards.



Solution 1:[1]

I assume the problem is that the "path to the button" is wrong. When you use querySelector you need to specify a valid css selector.

Checkout my example below

function doJobs(){
  let button = document.querySelector("#btn");
  for (let i = 0; i < 5; i++) {
      button.click();
  }
}

function sayHi(){
  alert("hi")
}
<button id="btn" onclick="sayHi()">
 click me
</button>

<button onclick="doJobs()">
 doJobs
</button>

Solution 2:[2]

You can do a getElementById and give an id at your button like this

<button id="nameyouwant" />

I guess you gave a wrong name.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ran Turner
Solution 2 Julien Machin