Repair MongoDB Database & Reduce Database Size

Hi @Rajan,

It looks like there may have been a mongoDB instance already running when you tried to start the database up with the older database files. I think the best course of action at this point would be to turn off anything related to cryoSPARC (including the database, and killing processes gracefully if you have to), then running a repair command.

For example:

  1. cryosparcm stop
  2. ps -ax | grep “supervisord” (kill only the process that is running from your cryosparc2 install)
    ps -ax | grep “cryosparc2_command” (kill all the matching processes related to your cryosparc2 instance)
    ps -ax | grep “mongod” (kill only the process running your cryosparc2 database)
    
    e.g. kill 82681
    
  3. Ensure you have a backup of your database
  4. eval $(cryosparcm env)
    cd cryosparc2_database
    mongod --dbpath ./ --repair
    

For more information on mongoDB 3.4.10 repairs, see the following article: https://docs.mongodb.com/v3.4/tutorial/recover-data-following-unexpected-shutdown/

2 Likes