Nextcloud version: 15.0.8.1 (using official docker image nextcloud:15-fpm-alpine)
Operating system and version: host runs CentOS 7.6.1810
Apache or nginx version: 1.15.12
PHP version: the one supplied with the Nextcloud image
The issue you are facing:
So I have the following problem.
I deleted about 800 GB of files via the webdav interface.
However it seems that this does not really delete the files, but rather move them to trash. Now the trashbin won’t open.
Yes there is a way if you have access to the NC-Instance-Commandline
ssh to your nextcloud server
$ sudo su
$ cd /path-to-your-nexcloud-data-location/ (this could be in /var/www/data/ for example)
(this needs root privileges…thats why I mentioned $ sudo su before)
There you should see the users that have logged in your Instance
Now you should remember with wich user you have deleted your 800GB of files.
Then:
$ cd /the-users-directory/ , that you have used for deleting those files.
in there should be a “files_trashbin”
-There you go:
$ cd files_trashbin/files/
and
$ ls
That should show you the files’ name and a cryptic file ending like “Filename.txt.31asd12”
There you can delete the files you want to delete or
$ rm *
will delete anything in the folder.
Important:
Nextcloud doesnt know yet that you made manual changes in that directory. Now it is important to do the following
$ cd /var/www/nextcloud
(or the path you used for your NC-Instance-Webserver)
$ sudo -u www-data php occ files:scan {USERNAME}
({USERNAME} hast to be replaced by the name of the user you used to delete the files in NC)
This process will take a while…after that everything should be clean and nextcloud knows that the files are deleted and they are not listed in Web-Trashbin (this can be used to undelete files for example).
EDIT:
WARNING, if you do it like that, all files in trashbin will be deleted forever!!! If you are not sure about deleting, please consider to make a backup of those files!!!