Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restoring a file from an older version corrupts it. #686

Open
fabio14 opened this issue Jul 3, 2024 · 0 comments
Open

restoring a file from an older version corrupts it. #686

fabio14 opened this issue Jul 3, 2024 · 0 comments

Comments

@fabio14
Copy link

fabio14 commented Jul 3, 2024

Steps to reproduce

  1. setup files_primary_s3 with aws
  2. upload a file (v1). If I download the current version it is fine
  3. Upload a file (v2) and replace the old version. If I download the current version it is fine
  4. Upload a file (v3) and replace the old version. If I download the current version it is fine
  5. restore the v1 file
  6. download the file

Exected result

v1 file

Actual Result

Partial V1 file or no file.

Note

The binaries on AWS are all fine, and previous versions can all be downloaded correctly from OWC.

Additional Information

While debugging, I noticed that the reference to the file in the oc_filecache table is not updated. Specifically, when a file is restored, all data from the last uploaded version, including the size, remains unchanged, and the record for the current version is not updated. Thus, when restoring the file to version v1, I still see the data for v3 in the database.

If I manually force the correct size with an sql update, I have no problems downloading the file correctly.

@fabio14 fabio14 changed the title restored version of a file is not coccr restoring a file from an older version corrupts it. Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant