Moving the whole database and data to a new cluster

Hi -

We are are currently running CryoSPARC 5.0.1 on a slurm cluster and will need to migrate to a new cluster and have a few questions.

  • Do you see any issue to transfer from 5.0.1 to a destination at 5.0.7 or should we update CryoSPARC before migrating?
  • What’s the best strategy now with v5? We migrated in the past, but not sure those instructions are still the best way to proceed with v5 of cryosparc. I would:
    • detach all projects
    • move to the new cluster
    • re-attach them to the v5.0.7
    • adjust symlinks using * * these instruction

Another question: how would you advise to deal with projects already set as “archived”?

Would appreciate any advice or feedback before doing the big move

Thanks,

Nicolas

@ncoudray Is there any chance to preserve the absolute paths of currently attached project directories during and after the migration?

The path of the projects can be preserved, but not the database and not the raw data (basically, the projects were saved in a /vast drive which will be mounted as such on the new cluster. However, the database and the raw imported movies were located on a different drive, and those will need to move to a new location. The way CryoSPARC will be installed and managed will also be slightly different (in containers as far as I know)

If anyone has any advice on how to best proceed, I’d appreciate :slight_smile:

@ncoudray We will post some recommendations. I am still confirming some information internally.

1 Like

Under this condition, there should be no need to detach projects from the old (and subsequently attach to the new) instance.
If there is also no change in the port number (CRYOSPARC_BASE_PORTvariable defined inside cryosparc_master/config.sh), you can follow option 2 in section D of that page.
Because your database is already operating under CryoSPARC v5.0.1, the database should be compatible with CryoSPARC v5.0.7.
After migration, follow the instructions for updating sym links that apply to CryoSPARC version on your new cluster.
Additionally, if the migration entails changes to your CryoSPARC worker infrastructure, you may have to disconnect existing scheduler lanes and connect new ones.

Thanks a lot @wtempel for the feedback. I discussed with the HPC team, and there are a few uncertainties (not all labs will have paths of the projects preserved and some other technical difficulties), they were suggesting doing something like this:

  • cryosparc will be reinstalled on the new cluster using new licenses so both the old and new one can be open at the same time, in case it’s needed during the transition.

- on the old cluster: export the database via cryosparcm database export-instance-config

  • on the new installation in the new cluster: cryosparcm database import-instance-config -f <tar>
  • on the new installation: remove existing lanes with cryosparcm cluster remove and add new ones

-detach each project from the old installation, rsync or mount them to the new location, re-attach them in the GUI

-fix the symlink

What do you think? Would the import/export take care of the archived projects properly without us having to do anything else?

Please can you describe what you mean with archived, to avoid any confusion?
It may be preferable to avoid the term archived in this particular forum thread except when specifically referring to the CryoSPARC Archive data management action.

ah, sorry. Yes, I did mean projects which have been set to > Actions > Archive project, as described in the CryoSPARC data management action link you shared.

Thanks for the clarification.

Do you mean you would select Archive instead of Detach project?
Projects for which the Archive action was selected would be intended to be unarchived on either

  • the same (“source”) CryoSPARC instance where the Archive action occurred
  • or a different instance that is running a copy of the database from the “source” instance where database records for the given project are unchanged compared wirth the project’s database records at the time the Archive action was selected.

Yes, your second point. I mean we already have over 10 projects archived on the old CryoSPARC.

If, in the future, we want to re-open these projects on the “new” CryoSPARC, meaning we want to potentially be able to unarchive them on a difference instance in the future.

So if we do the transfer the way our HPC team suggested (cryosparcm database export-instance-config using instance A, and cryosparcm database import-instance-config -f on instance B with both having different licenses), is that considered a proper “copy of the database” as you call it ? It sounds to me that the instance configuration will be copied, but that may not deal with the transfer of the archived projects to potentially re-open them on the new instance?

Exactly. Instance config would be missing the bulk of project and job information.

When attaching a detached project, database records for the project’s workspaces and jobs will be created from information in the project directory that was previously exported (“dumped”) from the source instance’s database.
When unarchiving an archived project, database records for the project’s jobs and workspaces are presumed to already exist (and to be consistent (“in sync”) with the actual contents of the project directory).

Thanks @wtempel (and thanks for your patience :slight_smile: )

So, if I understand, an archived project on instance A cannot be “attached” to another instance B because it is still “locked”, right? (what I mean here is that, we would call the tar folders from the tape, untar it, and try to “attach” to the new “instance B”, even though it was “archived” and not “detached” from “instance A”). If we could somehow save the “archive projects”, it sounds like simply detach and attach everything else and forget about migrating the database would be easier? If not, what solution would you suggest we explore (unlike what I said in my second message, let’s assume it’s a completely different cluster and the absolute paths of currently attached project directories is not conserved), and can it be done using a different license on the new instance?

It is possible to attach a project directory that was archived instead of detached if you remove the cs.lock file after untaring the project directory. One should only do this in the understanding that this workflow is an exception from the rule to not manually delete the cs.lock file from a project directory. In other words, confirm that the project directory from which one is about to remove the cs.lock file

  • was indeed just restored from tape or other archive storage
  • and is not confused with a project directory that is already attached to any CryoSPARC instance

Thanks. Yes, the project was restored from tape. It is not “attached” to another instance, but “was” and appears as “archived” projects in it.

BTW, unrelated, but I think the link to the benchmark dataset in Guide: Performance Benchmarking (v4.3+) | CryoSPARC Guide is not longer working