Skip to content
Get started

Roll back and undeploy

View as Markdown

Every version you upload stays in the network. Rolling back is deploying an earlier one again. Undeploying ends a deployment, and the version stays to deploy later.

Terminal window
mk versions list

It shows the 50 newest versions of your targets’ networks, with the selectors that run each. mk deployments list shows each deployment with the version it ran before.

Terminal window
mk rollback --target prod

mk rollback points the target back at the version it ran before. Rolling back twice goes forward again. To go back further, name the version:

Terminal window
mk rollback 5d2e7b18f0a1 --target prod

The id as mk versions list prints it is enough, for any version of the network, however old. Should another version share those 12 characters, mk says so: mk versions list --full prints whole ids. The servers swap back while players stay connected. With only one target, --target is not needed. Like mk deploy, mk rollback first lists the servers that run another platform version than the version it goes back to was built for; --strict-versions refuses then.

Terminal window
mk undeploy canary

mk undeploy ends the target’s deployment. The servers its selector picked stop those bundles and keep what other deployments give them. The version stays in the network, to deploy again with mk versions deploy.

The deployment’s history goes with it. From then on, also once you deploy to the target again, mk rollback without a version has nothing before to go back to: name the version, as mk undeploy prints it.

Was this helpful?