Is /usr/local/bin persistent across workspace restarts now?

It is my undestanding that to-date only the /workspace directory is persisted across workspace restarts. Today I tested the persistance of a script I copied over to /usr/local/bin. I stopped and restarted the workspace and the file was still there in /usr/local/bin.

Has something changed or has /usr/local/bin always been backed up across workspace restarts?

This has not changed yet. Are you sure you really stopped the workspace?

Yeah pretty sure. I will try again to be sure.

Yeah I can confirm this is happening. The browser said the workspace was stopped and upon restart /usr/local/bin/hot-reload persisted.
Gitpod username: apolopena
Workspace name: gold-rabbit-pbph8aes

I do copy this file over from the repo in .gitpod.Dockerfile so I guess that is what is happening when the workspace restarts. Sorry I am not very saavy on what happens regarding the Docker container when the workspace restarts.

Hi @Devz3n! :wave: Maybe I can help clarify this confusing situation a little bit:

Without “Full Workspace Backup” (i.e. today)

  • Changes made in a custom Dockerfile are always persisted, as part of the Docker image

  • Changes made in your .gitpod.yml tasks, or live in a workspace terminal, are only persisted when made under /workspace

With “Full Workspace Backup” (i.e. the new default next month)

  • Changes made in a custom Dockerfile are still always persisted

  • Changes made in your .gitpod.yml tasks, or live in a workspace terminal, are also always persisted (regardless if inside or outside /workspace)

So in your case, the /usr/local/bin change was made in a Dockerfile, so it survives workspace restarts.

Also, FYI, if you’re interested, we can already enable “Full Workspace Backup” on your account (as a Beta feature flag). This can allow you to use it sooner.

Otherwise, “Full Workspace Backup” will likely become the new default in Gitpod next month (at which point everything will always be persisted, and we can all forget all this /workspace mess :sweat_smile: ).


Ah thanks @jan for the detailed clarification :pray:

1 Like