Resynchronizing snapshots with S3 versions?

In our production instance, we had to manually remove versions of documents in our S3 bucket.

Do you have a proper way to remove snapshots whose versionId does not exist anymore?

If not, I can actually share with you a script (which transforms the meta.json file), but I would like to know if there exist some cleaner ways by chance.

In principle, if you just delete the meta.json file from the external store and from whatever worker is hosting the document (if any), it should get recreated. Granted, that’s not something I’ve done outside of tests, and it could also be a little slow if there are very many versions of the document that remain.

There is an endpoint for removing snapshots with some options:

None of the options are what you want. unlisted for sure is not (I think it is the reverse). past can be handy for getting rid of unwanted history. But it could be a place to put the kind of repair you want (essentially just to regenerate the meta.json file)

Interesting! I’ll try using the endpoint. That would probably be cleaner that overriding the meta.json file.