Skip to content

systemslab export workspace ​

Description Export a workspace along with all the contexts and notebooks in it.
Usagesystemslab export workspace [OPTIONS] <WORKSPACE>

Description ​

The systemslab export workspace command exports a workspace, and everything in it, to a tarball or zip archive. Use it to back up a whole workspace or move it to another SystemsLab server; import the archive with systemslab import workspace. To export a single context, use systemslab export context instead.

The archive holds:

  • manifest.json: metadata about the export, including the format version, the server it came from and the id of the workspace.
  • workspace.json: the workspace's slug, name, description and readme.
  • facets.json: the workspace's facets.
  • items.json: the workspace's contexts and notebooks, with the labels set on each context.
  • contexts/<id>/: each context, laid out exactly as systemslab export context would export it.
  • notebooks/<id>.json: each notebook, including the workspace's readme notebook even if it isn't one of the workspace's items. Links to entity pages on this server become mentions, as with systemslab export notebook, so the import can point them at the copies it makes.
bash
# Export to a tarball
systemslab export workspace allocators -o allocators.tar

# Export to a zip archive
systemslab export workspace allocators -o allocators.zip

# Export an archived workspace, whose slug no longer finds it, by its id
systemslab export workspace 0192f1a0-0000-7000-8000-000000000001 -o old.tar

TIP

Tarballs are not compressed, whatever the output path's extension. You can generate a compressed tarball by piping the output through a compressor like so

bash
systemslab export workspace allocators | gzip -9 > allocators.tar.gz

Options ​

OptionDefaultDescription
<WORKSPACE> The workspace's slug (e.g. allocators) or id. An archived workspace can only be found by its id.
-o, --output- The file to write the archive to, or - for stdout. The archive is a tarball unless the path ends in .zip, in which case it is a zip archive. Writing to stdout fails if stdout is a terminal.
-j, --parallel1 How many requests (context, experiment, notebook and artifact downloads) to run at once, across the whole workspace. Passing 0 will make this use the number of CPUs on the current machine.
--allow-errors Allow errors when downloading artifacts, such as artifacts deleted directly from the backing store. Artifacts that fail are left out of the archive with a warning, and the export still exits successfully.

Common Options ​

OptionDefaultDescription
--systemslab-url The URL at which to access the systemslab server.
--colorauto Controls when color is used in the output. Possible values are auto, always, and never.
--output-formatlong Output format to use when outputting messages. long will result output designed to be human-readable while short is short output meant to be used within scripts.

Environment Variables ​

VariableDescription
SYSTEMSLAB_URLSpecify the URL used to contact the SystemsLab server. Equivalent to --systemslab-url.