Restore database after crash

Hi, my cryosparc installation on cluster totally crashed after the master node was shut down. Nothing I could find on forum helped to restart/restore it, so I had to install a new instance. Running mongob --restore on previous database seem to have ended without errors, but if I point new instance to use previous database directory, it is not recognised (probably not surprisingly). Unfortunately, there was no any recent backup (lesson for future!).

Is there any way to restore database (it has a lot of projects)? Perhaps to force somehow new instance to work with old database directory? The owner user is the same…

Many thanks!

Assuming

  1. an intact database at /path/to/old/cryosparc_database
  2. a new cryosparc_master installation with the same $CRYOSPARC_BASE_PORT but different $CRYOSPARC_DB_PATH as the old instance
  3. the old and the new CryoSPARC instance have been stopped and the absence of CryoSPARC-related processes has been confirmed with suitable ps command(s)

one should be able to define

export CRYOSPARC_DB_PATH="/path/to/old/cryosparc_database"

inside the new instance’s cryosparc_master/config.sh and start the new instance with the old database.
The description of your recovery attempts so far suggests that the first assumption does not apply and the content of the old database directory has been corrupted. In this case, your only remedy may be to (see lower part of Warning: Could not get database status (attempt 1/3) - issue after storage outage - #4 by wtempel):

  1. define worker targets and CryoSPARC users in a fresh database.
  2. attach project directories to the new CryoSPARC instance.

In CryoSPARC v4.3.1, you may increase the resilience of your database against unexpected shutdowns by including (with space between quotes)

export CRYOSPARC_MONGO_EXTRA_FLAGS=" "

inside cryosparc_master/config.sh (and restarting CryoSPARC).

1 Like

Hi, the first option worked, thanks a lot! The key was to set the same port apparently.
All the best!