Bash and Python Script to download all files out of Nextcloud Trash bin and store it in original folder structure, because of Nextcloud Trashbin Restore Bug: nextcloud/server#31200
Get the XML response from nextcloud Trash Bin via Webdav
- Put in your Credentials and URL oft the nextcloud instance in file step1.sh
- run "bash step1.sh" in your Terminal
- File will be created in your current directoy.
Download each file of your trash bin an create the original folder structure. The nextcloud bug will always restore each file in the root folder. Thants not good :-)
- Put in your Credentials, URL and target path on your computer in file step2.py
- run the script in your terminal: python or pyhton3 step2.py
- In parallel, all your files will be downloaded. If your server will be busy, decrease the max_parallel_threads in step2.py