Bug report on "cryosparcm database restore" for v5.1+

Hello CryoSPARC Team,

We noticed a likely bug that prevents restoring the database from a backup in v5.1 and later. The same command works in versions prior to v5.0.8, though.

It seems that the command creates a folder named ‘typesense-data’ under ‘cryosparc_database’, which triggers the error: “database directory is not empty.” Please see the details below. Thanks for checking. Also, do you intend to deprecate this command and replace it with ‘cryosparcm recover’?

[user@cn4168 cryosparc_v5]$ rm -rf /data/user/apps/cryosparc_v5/cryosparc_database
[user@cn4168 cryosparc_v5]$ cryosparcm database restore --file cryosparc_backup_2026_11_30_10h13.archive
:warning: A database backup becomes outdated and incompatible with project directories as
soon as CryoSPARC projects or jobs are created, deleted, or modified following the database backup.
Restoration of an outdated database backup and subsequent use with CryoSPARC is likely to corrupt CryoSPARC projects.

Are you sure you want to restore ‘all collections’ from ‘cryosparc_backup_2026_11_30_10h13.archive’?
This will erase existing data.

Restoring from cryosparc_backup_2026_11_30_10h13.archive

ERROR: Unable to restore database: database directory /data/user/apps/cryosparc_v5/cryosparc_database is not empty.
Shut down
[user@cn4168 cryosparc_v5]$ ls -la /data/user/apps/cryosparc_v5/cryosparc_database
total 0
drwxr-xr-x 2 user staff 4096 Dec 2 09:15 .
drwxr-xr-x 2 user staff 4096 Dec 2 09:15 ..
drwxr-xr-x 2 user staff 4096 Dec 2 09:15 typesense-data

Thanks @morganyang422 for reporting. We are investigating this issue.

As a temporary workaround to enable restoration, you may

  1. stop CryoSPARC
  2. remove the
    /data/user/apps/cryosparc_v5/cryosparc_database/typesense-data/`
    
    directory
  3. comment out the line
        core.settings.typesense_data_dir.mkdir(parents=True, exist_ok=True)
    
    like so
    #    core.settings.typesense_data_dir.mkdir(parents=True, exist_ok=True)
    
    (approx. line 162 in file
    /path/to/cryosparc_master/cli/supervisor.py
    
    )
  4. restore the database
  5. remove the # character you just placed inside the supervisor.py file.
  6. restart CryoSPARC.