Skip to main content
For a while, the self-hosted Omni guide was missing the etcd volume mount in the docker run example. Omni instances set up by following it keep the embedded etcd data inside the container instead of on the host. The data is intact, but it is deleted together with the container, e.g., when the container is recreated for an upgrade.

Check if you are affected

Run this on the host. If your container is not named omni, use its name instead (docker ps -a lists them).
If it prints “not affected”, you are done. Otherwise, follow the steps below.

Move the data to the host

The commands below use the current directory. The copy taken in step 3 lands in ./etcd, and step 5 mounts that same directory into the new container as its permanent data directory on the host. Because of this, run all steps from the directory you normally start Omni from, the one holding the certificate files from the setup guide. Run the commands one at a time, and if one of them errors, stop there.
  1. Check the container is not set to auto-remove.
This must print false. If it prints true, do not stop the container. Stopping it would delete it together with the data. Contact support in that case.
  1. Stop Omni. Do not remove the container.
This stops etcd from writing, so that the copy taken in the next step is consistent. The data stays inside the stopped container.
  1. Copy the etcd data out of the container.
The /. form copies the directory contents, and works the same whether ./etcd existed before or not.
  1. Keep the old container as a backup.
The old container still holds the original copy of the data. Renaming it keeps it around until the new instance is checked, and frees the omni name.
  1. Start Omni again with the missing mount added.
Use the same docker run command and the same image version as before, and add this to the mounts:
If you are not sure which image the old container was running, docker inspect omni-old --format '{{.Config.Image}}' prints it. Do not upgrade in the same step. First get back to a working state, then upgrade the normal way.
  1. Check everything is there, then clean up.
Log in to Omni and confirm your clusters and machines are all present. Re-run the check command from above, it should now print “not affected”. Only then remove the backup container:
If you pass any other host paths to Omni without a mount (e.g., a local etcd backup directory), copy those out of omni-old the same way before removing it.

If you run Omni with docker compose

Do not run docker compose down. It removes the container together with the data. Instead:
  • Stop with docker compose stop omni, then copy the data out as in step 3.
  • Make an extra copy on the host (cp -a etcd etcd.bak) instead of renaming the container. Compose removes the old container on the next docker compose up -d even when it was renamed, so the rename does not protect anything there.
  • Add the volume to the compose file and run docker compose up -d.
  • After checking everything is there, remove the extra copy with rm -rf etcd.bak.