wwe
March 3, 2022, 11:55am
3
take a look at this SQL queries:
I tryed hard to find a universal solution to link the file damaged by the sync with valid versions and allow subsequent recovery… at the moment my sql skills only allow this summary of intermediate steps which hopefully helps others. for some really strange reason there is no clear relation (in terms of unique ID) between the files and their versions… both are listed in the oc_filecache table… the only difference is
real files have prefix files/
while versions have files_versions/ prefix and …
I spend more time on this and created a SQL query collecting all files with invalid (1970-01-01) file mtime from the DB and checking for files_versions of this files in the DB with their change time and original mtime.
one can use the output to correct the mtime easily (if your DB still has file versions entries).
Warning:
At the moment I don’t know if it work when multiple versions of the damaged file exist (don’t have in my playground), simple sort/limit should choose good version but need…
it gives you good idea about the DB structure and how files and their previous version belong together. Should be not hard to adopt for deleted files..