Export projects using command line

Hi,

My cryosparc was crashed somehow. Before I reinstalled the cryosparc, I backed up the database simply by copying it to a new directory. However, after I updated the cryosparc database path, the cryosparc cannot configure the database. I also tried to repair the database using monogod, however, it complained the following error (sorry for the long text):

$ mongod --dbpath ./ --repair
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] MongoDB starting : pid=47713 port=27017 dbpath=./ 64-bit host=tao
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] db version v3.6.23
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] git version: d352e6a4764659e0d0350ce77279de3c1f243e5c
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] allocator: tcmalloc
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] modules: none
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] build environment:
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] distarch: x86_64
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] target_arch: x86_64
2024-08-03T15:43:07.028+0800 I CONTROL [initandlisten] options: { repair: true, storage: { dbPath: “./” } }
2024-08-03T15:43:07.029+0800 I - [initandlisten] Detected data files in ./ created by the ‘wiredTiger’ storage engine, so setting the active storage engine to ‘wiredTiger’.
2024-08-03T15:43:07.029+0800 I STORAGE [initandlisten] Detected WT journal files. Running recovery from last checkpoint.
2024-08-03T15:43:07.029+0800 I STORAGE [initandlisten] journal to nojournal transition config: create,cache_size=515249M,cach e_overflow=(file_max=0M),session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),compatib ility=(release=“3.0”,require_max=“3.0”),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idl e_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2024-08-03T15:43:08.021+0800 I STORAGE [initandlisten] WiredTiger message [1722670988:21867][47713:0x7f428db21a40], txn-recov er: Main recovery loop: starting at 456/23778688
2024-08-03T15:43:08.022+0800 I STORAGE [initandlisten] WiredTiger message [1722670988:22103][47713:0x7f428db21a40], txn-recov er: Recovering log 456 through 467
2024-08-03T15:43:08.022+0800 E STORAGE [initandlisten] WiredTiger error (0) [1722670988:22991][47713:0x7f428db21a40], file:co llection-10–7187919453197647892.wt, txn-recover: __wt_block_read_off, 291: collection-10–7187919453197647892.wt: read checks um error for 4096B block at offset 458752: block header checksum of 778215529 doesn’t match expected checksum of 2630173637 Ra w: [1722670988:22991][47713:0x7f428db21a40], file:collection-10–7187919453197647892.wt, txn-recover: __wt_block_read_off, 291 : collection-10–7187919453197647892.wt: read checksum error for 4096B block at offset 458752: block header checksum of 778215 529 doesn’t match expected checksum of 2630173637
2024-08-03T15:43:08.023+0800 E STORAGE [initandlisten] WiredTiger error (0) [1722670988:23102][47713:0x7f428db21a40], file:co llection-10–7187919453197647892.wt, txn-recover: __wt_bm_corrupt_dump, 144: {458752, 4096, 2630173637}: (chunk 1 of 4): 00 00
2024-08-03T15:43:08.025+0800 E STORAGE [initandlisten] WiredTiger error (-31802) [1722670988:25936][47713:0x7f428db21a40], fi le:collection-10–7187919453197647892.wt, txn-recover: __wt_block_read_off, 302: collection-10–7187919453197647892.wt: fatal read error: WT_ERROR: non-specific WiredTiger error Raw: [1722670988:25936][47713:0x7f428db21a40], file:collection-10–7187919 453197647892.wt, txn-recover: __wt_block_read_off, 302: collection-10–7187919453197647892.wt: fatal read error: WT_ERROR: non -specific WiredTiger error
2024-08-03T15:43:08.026+0800 E STORAGE [initandlisten] WiredTiger error (-31804) [1722670988:25989][47713:0x7f428db21a40], fi le:collection-10–7187919453197647892.wt, txn-recover: __wt_panic, 523: the process must exit and restart: WT_PANIC: WiredTige r library panic Raw: [1722670988:25989][47713:0x7f428db21a40], file:collection-10–7187919453197647892.wt, txn-recover: __wt_p anic, 523: the process must exit and restart: WT_PANIC: WiredTiger library panic
2024-08-03T15:43:08.026+0800 F - [initandlisten] Fatal Assertion 50853 at src/mongo/db/storage/wiredtiger/wiredtiger_ut il.cpp 420
2024-08-03T15:43:08.026+0800 F - [initandlisten] \n\n***aborting after fassert() failure\n\n
2024-08-03T15:43:08.052+0800 F - [initandlisten] Got signal: 6 (Aborted).

0x55574e344f21 0x55574e344139 0x55574e34461d 0x7f428ca6e630 0x7f428c6c7387 0x7f428c6c8a78 0x55574ca28dec 0x55574cb03d76 0x555 74cb75ad1 0x55574c9c5a94 0x55574c9c5eb4 0x55574cc2c3b5 0x55574cc4ad6f 0x55574cc4b2cb 0x55574cc476b5 0x55574cc2ba57 0x55574cb9d d5e 0x55574cb173f2 0x55574cb743bd 0x55574cb7499d 0x55574cb74c2c 0x55574cbe6e52 0x55574cb6fec8 0x55574cb8d3d9 0x55574cb8d947 0x 55574cc0b1d8 0x55574cb8ee68 0x55574cb191e7 0x55574cb15ca3 0x55574cae2ffc 0x55574cac4aec 0x55574ccd4fb6 0x55574caa15b8 0x55574c aa463c 0x55574ca2abc9 0x7f428c6b3555 0x55574ca8c741
----- BEGIN BACKTRACE -----
{“backtrace”:[{“b”:“55574C09F000”,“o”:“22A5F21”,“s”:“_ZN5mongo15printStackTraceERSo”},{“b”:“55574C09F000”,“o”:“22A5139”},{“b”: “55574C09F000”,“o”:“22A561D”},{“b”:“7F428CA5F000”,“o”:“F630”},{“b”:“7F428C691000”,“o”:“36387”,“s”:“gsignal”},{“b”:“7F428C69100 0”,“o”:“37A78”,“s”:“abort”},{“b”:“55574C09F000”,“o”:“989DEC”,“s”:“_ZN5mongo32fassertFailedNoTraceWithLocationEiPKcj”},{“b”:“55 574C09F000”,“o”:“A64D76”},{“b”:“55574C09F000”,“o”:“AD6AD1”},{“b”:“55574C09F000”,“o”:“926A94”,“s”:“__wt_err_func”},{“b”:“55574C 09F000”,“o”:“926EB4”,“s”:“__wt_panic”},{“b”:“55574C09F000”,“o”:“B8D3B5”,“s”:“__wt_block_read_off”},{“b”:“55574C09F000”,“o”:“BA BD6F”,“s”:“__wt_block_extlist_read”},{“b”:“55574C09F000”,“o”:“BAC2CB”,“s”:“__wt_block_extlist_read_avail”},{“b”:“55574C09F000” ,“o”:“BA86B5”,“s”:“__wt_block_checkpoint_load”},{“b”:“55574C09F000”,“o”:“B8CA57”},{“b”:“55574C09F000”,“o”:“AFED5E”,“s”:“__wt_b tree_open”},{“b”:“55574C09F000”,“o”:“A783F2”,“s”:“__wt_conn_dhandle_open”},{“b”:“55574C09F000”,“o”:“AD53BD”,“s”:“_wt_session get_dhandle”},{“b”:“55574C09F000”,“o”:“AD599D”,“s”:“__wt_session_get_dhandle”},{“b”:“55574C09F000”,“o”:“AD5C2C”,“s”:“__wt_sess ion_get_btree_ckpt”},{“b”:“55574C09F000”,“o”:“B47E52”,“s”:“__wt_curfile_open”},{“b”:“55574C09F000”,“o”:“AD0EC8”},{“b”:“55574C0 9F000”,“o”:“AEE3D9”},{“b”:“55574C09F000”,“o”:“AEE947”},{“b”:“55574C09F000”,“o”:“B6C1D8”,“s”:“__wt_log_scan”},{“b”:“55574C09F00 0”,“o”:“AEFE68”,“s”:“__wt_txn_recover”},{“b”:“55574C09F000”,“o”:“A7A1E7”,“s”:“__wt_connection_workers”},{“b”:“55574C09F000”,“o “:“A76CA3”,“s”:“wiredtiger_open”},{“b”:“55574C09F000”,“o”:“A43FFC”,“s”:”_ZN5mongo18WiredTigerKVEngineC2ERKNSt7__cxx1112basic_s tringIcSt11char_traitsIcESaIcEEES8_PNS_11ClockSourceES8_mmbbbb”},{“b”:“55574C09F000”,“o”:“A25AEC”},{“b”:“55574C09F000”,“o”:“C3 5FB6”,“s”:“_ZN5mongo20ServiceContextMongoD29initializeGlobalStorageEngineEv”},{“b”:“55574C09F000”,“o”:“A025B8”},{“b”:“55574C09 F000”,“o”:“A0563C”,“s”:“ZN5mongo11mongoDbMainEiPPcS1”},{“b”:“55574C09F000”,“o”:“98BBC9”,“s”:“main”},{“b”:“7F428C691000”,“o”: “22555”,“s”:“_libc_start_main"},{“b”:“55574C09F000”,“o”:“9ED741”}],“processInfo”:{ “mongodbVersion” : “3.6.23”, “gitVersion” : “d352e6a4764659e0d0350ce77279de3c1f243e5c”, “compiledModules” : [], “uname” : { “sysname” : “Linux”, “release” : “3.10.0-116 0.88.1.el7.x86_64”, “version” : “#1 SMP Tue Mar 7 15:41:52 UTC 2023”, “machine” : “x86_64” }, “somap” : [ { “b” : “55574C09F00 0”, “elfType” : 3, “buildId” : “B0818C001F2B63D4533D208F68F08AE2A599CA9E” }, { “b” : “7FFCC3894000”, “elfType” : 3, “buildId” : “EC1066C1348B23D63BB053C4EC5B2F3909DC85AF” }, { “b” : “7F428D5A3000”, “path” : "/data1/Programs/cryoSparc_install/cryosparc master/deps/anaconda/envs/cryosparc_master_env/lib/libpython3.10.so”, “elfType” : 3 }, { “b” : “7F428D389000”, “path” : “/lib6 4/libresolv.so.2”, “elfType” : 3, “buildId” : “E0CD0DD5466E6B9E5FB10BFAFF13B1BB50F08EAA” }, { “b” : “7F428D181000”, “path” : " /lib64/librt.so.1", “elfType” : 3, “buildId” : “3E44DF7055942478D052E40FDD1F5B7862B152B0” }, { “b” : “7F428CF7D000”, “path” : “/lib64/libdl.so.2”, “elfType” : 3, “buildId” : “7F2E9CB0769D7E57BD669B485A74B537B63A57C4” }, { “b” : “7F428CC7B000”, “path” : “/lib64/libm.so.6”, “elfType” : 3, “buildId” : “7615604EAF4A068DFAE5085444D15C0DEE93DFBD” }, { “b” : “7F428DB26000”, “path” : “/data1/Programs/anaconda3/envs/emready_env/lib/libgcc_s.so.1”, “elfType” : 3 }, { “b” : “7F428CA5F000”, “path” : “/lib64/lib pthread.so.0”, “elfType” : 3, “buildId” : “E10CC8F2B932FC3DAEDA22F8DAC5EBB969524E5B” }, { “b” : “7F428C691000”, “path” : “/lib 64/libc.so.6”, “elfType” : 3, “buildId” : “9470E279388F7F9CB2ED3B2872D0C2095B191FF4” }, { “b” : “7F428D940000”, “path” : “/lib 64/ld-linux-x86-64.so.2”, “elfType” : 3, “buildId” : “62C449974331341BB08DCCE3859560A22AF1E172” }, { “b” : “7F428C48E000”, “pa th” : “/lib64/libutil.so.1”, “elfType” : 3, “buildId” : “FF2196BD22A8443054C83031E0E76EB01BA1219C” } ] }}
mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x55574e344f21]
mongod(+0x22A5139) [0x55574e344139]
mongod(+0x22A561D) [0x55574e34461d]
libpthread.so.0(+0xF630) [0x7f428ca6e630]
libc.so.6(gsignal+0x37) [0x7f428c6c7387]
libc.so.6(abort+0x148) [0x7f428c6c8a78]
mongod(_ZN5mongo32fassertFailedNoTraceWithLocationEiPKcj+0x0) [0x55574ca28dec]
mongod(+0xA64D76) [0x55574cb03d76]
mongod(+0xAD6AD1) [0x55574cb75ad1]
mongod(__wt_err_func+0x90) [0x55574c9c5a94]
mongod(__wt_panic+0x3F) [0x55574c9c5eb4]
mongod(__wt_block_read_off+0x585) [0x55574cc2c3b5]
mongod(__wt_block_extlist_read+0x8F) [0x55574cc4ad6f]
mongod(__wt_block_extlist_read_avail+0x2B) [0x55574cc4b2cb]
mongod(__wt_block_checkpoint_load+0x275) [0x55574cc476b5]
mongod(+0xB8CA57) [0x55574cc2ba57]
mongod(__wt_btree_open+0xD7E) [0x55574cb9dd5e]
mongod(__wt_conn_dhandle_open+0x352) [0x55574cb173f2]
mongod(__wt_session_get_dhandle+0xED) [0x55574cb743bd]
mongod(__wt_session_get_dhandle+0x6CD) [0x55574cb7499d]
mongod(__wt_session_get_btree_ckpt+0x14C) [0x55574cb74c2c]
mongod(__wt_curfile_open+0x52) [0x55574cbe6e52]
mongod(+0xAD0EC8) [0x55574cb6fec8]
mongod(+0xAEE3D9) [0x55574cb8d3d9]
mongod(+0xAEE947) [0x55574cb8d947]
mongod(__wt_log_scan+0xEE8) [0x55574cc0b1d8]
mongod(__wt_txn_recover+0x8D8) [0x55574cb8ee68]
mongod(__wt_connection_workers+0x37) [0x55574cb191e7]
mongod(wiredtiger_open+0x1BD3) [0x55574cb15ca3]
mongod(_ZN5mongo18WiredTigerKVEngineC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_PNS_11ClockSourceES8_mmbbbb+0 xBDC) [0x55574cae2ffc]
mongod(+0xA25AEC) [0x55574cac4aec]
mongod(_ZN5mongo20ServiceContextMongoD29initializeGlobalStorageEngineEv+0x266) [0x55574ccd4fb6]
mongod(+0xA025B8) [0x55574caa15b8]
mongod(ZN5mongo11mongoDbMainEiPPcS1+0x26C) [0x55574caa463c]
mongod(main+0x9) [0x55574ca2abc9]
libc.so.6(__libc_start_main+0xF5) [0x7f428c6b3555]
mongod(+0x9ED741) [0x55574ca8c741]
----- END BACKTRACE -----
Aborted (core dumped)

Any suggestions are greatly appreciated.

Thanks,

Hongtao

I forgot to mention that, after I tried to edit the database path in config.sh, the error message given by cryoSparc was:

cryosparcm restart
CryoSPARC is not already running.
If you would like to restart, use cryosparcm restart
Starting CryoSPARC System master process…
CryoSPARC is not already running.
configuring database…
Warning: Could not get database status (attempt 1/3)
Warning: Could not get database status (attempt 2/3)
Warning: Could not get database status (attempt 3/3)
Traceback (most recent call last):
File “”, line 1, in
File “/work/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py”, line 47, in configure_mongo
initialize_replica_set()
File “/work/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py”, line 84, in initialize_replica_set
admin_db = try_get_pymongo_db(mongo_client)
File “/work/software/cryosparc/cryosparc_master/cryosparc_compute/database_management.py”, line 251, in try_get_pymongo_db
admin_db.command(({‘serverStatus’: 1}))
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/_csot.py”, line 107, in csot_wrapper
return func(self, *args, **kwargs)
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/database.py”, line 890, in command
with self.__client._conn_for_reads(read_preference, session) as (
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/mongo_client.py”, line 1346, in _conn_for_re ads
server = self._select_server(read_preference, session)
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/mongo_client.py”, line 1303, in _select_serv er
server = topology.select_server(server_selector)
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/topology.py”, line 302, in select_server
server = self._select_server(selector, server_selection_timeout, address)
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/topology.py”, line 286, in _select_server
servers = self.select_servers(selector, server_selection_timeout, address)
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/topology.py”, line 237, in select_servers
server_descriptions = self._select_servers_loop(selector, server_timeout, address)
File “/data1/Programs/cryosparc/cryosparc_master/deps/anaconda/envs/cryosparc_master_env/lib/python3.10/site-packages/pymongo/topology.py”, line 259, in _select_servers_l oop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: localhost:39001: [Errno 111] Connection refused (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 20.0s, Topology Description: <TopologyDescription id: 66adbec585a8beb57d4f1559, topology_type: Single, servers: [<ServerDescription (‘localhost’, 39001) server_typ e: Unknown, rtt: None, error=AutoReconnect(‘localhost:39001: [Errno 111] Connection refused (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)’) >]>
[2024-08-03T13:24:28+0800] Error configuring database. Most recent database log lines:
mongod(wiredtiger_open+0x1BD3) [0x55c615c79ca3]
mongod(_ZN5mongo18WiredTigerKVEngineC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_PNS_11ClockSourceES8_mmbbbb+0x8D6) [0x55c615c46cf6]
mongod(+0xA25AEC) [0x55c615c28aec]
mongod(_ZN5mongo20ServiceContextMongoD29initializeGlobalStorageEngineEv+0x266) [0x55c615e38fb6]
mongod(+0xA025B8) [0x55c615c055b8]
mongod(ZN5mongo11mongoDbMainEiPPcS1+0x26C) [0x55c615c0863c]
mongod(main+0x9) [0x55c615b8ebc9]
libc.so.6(__libc_start_main+0xF5) [0x7f0beaff9555]
mongod(+0x9ED741) [0x55c615bf0741]
----- END BACKTRACE -----

Please can you provide the following additional details:

  1. What was the version of CryoSPARC, before the reinstallation?
  2. Is the pre-reinstallation, database directory (source of the copy) still available?
  3. Was CryoSPARC stopped at the time of the copy?

Thanks for your feedback.

  1. The version is V4.5.3.
  2. The source of the copy is still avaliable.
  3. I believe that the cryoSparc was stopped during the copy.

@Hongtao Please can you post the output of the commands

sha1sum /source/of/copy/database/path/collection-10–7187919453197647892.wt
sha1sum /new/copy/database/path/collection-10–7187919453197647892.wt

It is very interesingly that, after I copied the database back to the original directory, the data base repair was successful. Everything works now. Thanks for your suggestions anyway.

Thanks @Hongtao for this update. Do you use CryoSPARC v4.4 or later so that you have database journalling enabled (for increased robustness of the database)? Please be aware of limitations of the
--repair procedure.

I am using V4.5.3 now. I have checked some of the my jobs, and they seems no problem.

1 Like