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!
Are only such jobs missing that were created after the backup that you just restored?
This behavior is not expected.
Was this an attempt to attach the project to a new database, or to the database that was restored from backup?
Did you observe any error messages during the attachment attempt?
Was the project whose attachment you attempted previously part of the CryoSPARC instance that crashed and whose database was damaged?
If you wish, you may email us a compressed copy of /path/to/cryosparc_master/run/command_core.log, also specifying the path of project directory to be imported.
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.