One of our cryosparc instances crashed, and the database file got damaged (over 180GB total). I tried the mongo repair database command, but it showed that one of the files was corrupt and exited in error. I restored the old database backup, but multiple jobs are missing. In previous cryosparc versions, it was possible to import a project, and it “regenerated” the project structure. However, with the new cryosparc v4 attaching the project to a new database generates an empty project. Could you suggest some solution to it? We will increase the frequency of the backups, but still, there should be some additional solutions in cases like this. Thanks!
Likely, creation of the fresh database entailed creation of a new “instance ID”. Attachment of a project directory would fail if the project directory was still locked to an older instance ID. I noticed this problem inside a log file you provided.
We generally discourage manipulation of cs.lock files. An exception may be warranted when an (outdated) database backup is missing information on many newer jobs, and you may prefer starting from a fresh database:
recreate your CryoSPARC users
re-connect your worker host(s) or cluster(s)
attach project directories after removing existing cs.lock files
I strongly recommend more frequent backups going forward to avoid having to resort to this tedious procedure.