I’m trying to figure out how best to achieve the following in Cryosparc 4:
Instance A starts a project on network storage. Later on, I want to continue on Instance B, which is connected to the same network storage, and remove the project from A.
I thought I would be able to:
Detach from Instance A.
Attached to Instance B.
Delete project in Instance A without affecting further work on B.
But it seems impossible to remove a detached project?
We usually run Live sessions on a dedicated instance, and then handover to other instances when the Live session is closed. The lock file in version 4 is a welcome security feature to avoid two instances fighting over the same project, but I would like to avoid the clutter (and ever increasing database size, I assume) from detached projects building up over time.
I also tried the detach function in CS4, because I wanted to backup and delete a project.
But one cannot delete projects after they are detached from GUI (although it is possible from icli).
We have a very big mongoDB (~1 TB), thus it is important to trim this as projects gets retired.
Only current option (not ideal), as I see it, is to archive from GUI which also synchronize DB with filesystem, but here it is possible to un-archive and afterwards delete project from GUI after data have been backed up.
I just started to play with this feature and would like to +1 the option to still be able to delete a project after detaching it. In this case maybe it doesn’t trigger any FS work, just clear project info from the DB?
Delete project while attached → clean up FS, cleanup DB
Delete project while detached → cleanup DB
Reclaiming database space corresponding to detached projects is not yet implemented, but implementation is on our roadmap for a future software release.
We anticipate that the implementation will also enable space reclamation for projects that were detached in the past.
I did not try to remove anything yet. If you have a recommended way I would be happy to hear it!
Unless an update with this function included in the GUI is expected to arrive within weeks, in which case we can probably wait for that.
We do not currently have a recommended procedure that both
deletes project-related database records
leaves the project directory intact
An imperfect workaround might be:
Detach the project
Prepare and set aside a copy of the (detached) project directory
Re-attach the project
[Caution: deletes project data on filesystem] Delete the project via the browser interface or (CLI) delete_project()
After database records for the project’s jobs have been deleted, disk space needs to be reclaimed by compacting the events, fs.files and fs.chunks collections.
Please see this topic regarding the authorization for admin commands like compact.
The option to delete detached projects from the database in the current version (4.1.2) is working great for our setup - thank you for adding that feature!
However, we have one project that stays in the list of project (still as detached) after deleting it. The command_core log indicates no issues:
2023-02-03 11:37:46,747 COMMAND.DATA delete_detached_project_run INFO | Deleting detached project P389
2023-02-03 11:37:46,750 COMMAND.DATA delete_detached_project_run INFO | Deleted detached project P389 in 0.003s
2023-02-03 11:39:39,665 COMMAND.DATA delete_detached_project_run INFO | Deleting detached project P389
2023-02-03 11:39:39,668 COMMAND.DATA delete_detached_project_run INFO | Deleted detached project P389 in 0.003s
Checking again now, it seems the project has disappeared from my list of projects. I don’t know when or how it happened, so I’ll considered it solved unless it happens again.