i a trying to find a solution to restore approximately 1600 pdf files to the previous last version. All of these pdf files are 0 byte. My suspicion is that something went wrong with OCR Workflow. But i did not investigating this further so far.
find . -type f -iname '*.pdf' -empty > list.txt
i was able to get all of these files. Is there a way to restore them with an occ command or something else? Any other ideas are also welcome.
Thanks j-ed for pointing me in the right direction!
The situation is likely related to a bug in Workflow OCR. https://github.com/R0Wi/workflow_ocr/issues/79
With a script i could overwrite the files from “user/files_versions/…” to “user/files/…” and then did a “occ files:scan user”.
The nextcloud webpage shows the reverted PDF files now correctly. However, my Linux desktop client 3.0.2 (Ubuntu) is not updating. Cron jobs are running fine…
Use a script to detect all zero byte PDFs in ‘user/files/’ directory, cross-check if an older version is available in ‘user/files_versions/’ directory and then overwrite the empty PDF with the newest version
run sudo -u www-data php occ files:scan --all
This was only updating PDF files on Nextcloud website
uncheck → apply → check all related folders in desktop client
Why? I don’t know. But i got all PDFs back on my computer.