Skip to main content
Star OpenZiti on GitHub Star
Version: 2.x

Upgrade a quickstart network

Back up and upgrade your controller and routers with these steps.

Back up existing network

While you can certainly back up every file relating to your network, there are only a few that would be necessary. To back up the necessary files follow these steps:

  1. Back up the database:
    1. Run the following:
    ziti edge db snapshot
    1. This will create a backup file in the same directory as your controller's DB file. It will have the same name as the controller DB file (usually ctrl.db) with a date and timestamp appended to it in the following format ctrl.db-YYYYMMDD-HHMMSS. If you're not sure where your DB file is located, you can find the location in the db section of your controller config.
  2. Back up the controller PKI.
    1. Copy the PKI directory to a safe backup location (default path: $ZITI_HOME/quickstart/$(hostname -s)/pki/).
  3. Back up the controller config file (default path: $ZITI_HOME/$(hostname -s).yaml).
  4. Back up the environment file (default path: $ZITI_HOME/$(hostname -s).env).
  5. Back up any router config files.
    1. If you used one of our quickstarts, the single edge router created defaults to $ZITI_HOME/$(hostname -s)-edge-router.yaml.

Stop existing services

If your network is using services to run your controller and/or router(s), stop those services.

Obtain the desired binary

Releases are available on the OpenZiti releases page. There is a helpful script function called getZiti that will obtain the binary and determine the correct architecture and OS for you.

Here is the process for using getZiti to obtain the latest binary. You may optionally add yes as an argument to the getZiti function to have the new ziti binary automatically added to your $PATH.

source /dev/stdin <<< "$(wget -qO- https://get.openziti.io/quick/ziti-cli-functions.sh)"
getZiti
note

After upgrading the binary, be sure to check your $PATH to ensure it is pointing to the new binary.

Update services

If you have services to start up the network, update them to use the new binary file.

The ExecStart section on a systemd service will point to the full path to the old binary. Update this line to point to the path of the newly downloaded binary. Any path in the service file needs to be updated similarly.

For example, the following portion of the ExecStart:

.../ziti-v0.28.0/ziti" controller run

will be updated to the following for v0.28.2 and later:

.../ziti-v0.30.4/ziti" controller run

Reload and start services

To reflect changes made to the services, reload the service daemon and start your services.

Upgrade versions <=v0.28.2

If your OpenZiti network was v0.28.3 or later, you can ignore this section.

A major change to environment variable names was performed in v0.28.3. If your network was v0.28.2 or earlier, you may optionally run the following commands to update your env file to use the updated environment variable names:

source /dev/stdin <<< "$(wget -qO- https://get.openziti.io/quick/ziti-cli-functions.sh)"
performMigration