Hello,
Is it possible to change the output directory of a workspace? My disk is full and can not run anymore jobs. Alternatively can i import or copy a workflow into a newly created workspace with a new output directory? Or import jobs across workspaces? Or some similar way of doing this? Sorry if this has been discussed already. I could not find anything related to this
thanks!
Hi @BWise,
Projects are strict divisions, in the sense that files and jobs from different projects are stored in different project directories, and jobs cannot be connected from one project to another. Workspaces, on the other hand, are intended simply to allow logical separation of jobs and workflows so that they can be more easily managed in a large project. [source]
If you want to change the output directory of a job within a project, you are going to have to move the entire project, which will have to be done through the CLI.
Job metadata is stored in a document specific to each job. Regarding file paths, only the relative directory of each job is saved (relative to the project its within- e.g. if the abs. path of a file within P1 J53’s directory is /u/cryosparc_user/cryosparc_projects/P1/J53/imported_movies/movie_0001.mrc
, only J53/imported_movies/movie_0001.mrc
is saved in the Job’s metadata document.
This means that when creating or running a job, the absolute path of the job’s files are created dynamically by concatenating the project’s absolute directory and the job’s relative directory.
Therefore, after ensuring no jobs within the project in question are running, we can change the project’s absolute directory via the CLI, and copy the entire project folder to a different disk.
First, ensure no jobs within the project in question are running.
- Create a new project directory on the new disk (with the same project uid).
(e.g.mkdir -p /bulk0/userhome/cryosparcprod/production_cryosparc/new_project_parent_dir/P4
- In a terminal, run
cryosparcm icli
and wait for the interactive cli to load. - Update the project’s directory:
cli.update_project( project_uid = 'P4', attrs = { 'project_dir' : '/bulk0/userhome/cryosparcprod/production_cryosparc/new_project_parent_dir/P4' })
- Go into the old project directory and copy all contents into the new project directory:
(e.g.cp -r /bulk0/userhome/cryosparcprod/production_cryosparc/cryosparc2_projects/P4/* /bulk0/userhome/cryosparcprod/production_cryosparc/new_project_parent_dir/P4/
)
Hope this helps!
thanks a lot!
that worked perfectly