Goal
Rollback a highly available Octopus server instance to a previous working version after a failed upgrade attempt.
Prerequisites
- Full backup of the Octopus database from before the upgrade attempt.
- A full database backup is necessary to ensure full functionality following a rollback. Partial or table-level restores are insufficient and will lead to long-term issues with your Octopus instance.
- Permissions to restore a database backup in SQL.
- A copy of the Octopus Server home folder directories:
ArtifactsPackagesTaskLogsEventExports- A copy of your Master Key.
- Octopus Server MSI of the previous Octopus version.
Steps
If you accessed and used your Octopus instance following the upgrade, follow these additional steps:
- Place your Octopus instance into maintenance mode if maintenance mode was disabled after the upgrade attempt.
- Toggle the Drain option for each Octopus server node in
Configuration > Nodes. - Ensure the Octopus service is stopped on all nodes once all deployments have finished.
- You can stop the service via the Octopus Manager or using the command line.
Octopus.Server.exe service --stop
Follow the following procedure once your Octopus instance is fully shut down:
- Restore the backup of the Octopus database.
- Restore Octopus folders.
- Install the previous Octopus version on one node.
- Once the previous version of Octopus is installed, open
Octopus Managerand restart the Octopus service. - The first node will connect to the restored Octopus database, and if the version installed matches the previous version found in the database, the Octopus service should start without issues.
- Follow the same procedure of installing the previous Octopus version on each additional node.
- Similar to the first node, make sure the Octopus Service is started once the previous version is installed.
- Important: Do not start the Octopus service on any nodes before reinstalling the previous version. If a later version of the Octopus service is started, it will perform another upgrade of the Octopus database.
Verify
Verification Steps:
- Log into the Octopus instance to ensure the UI is loading and pages are operating normally.
- Check the version by clicking the
user account menuicon in the lower left of the Octopus UI. - Check the
Configuration > Nodesscreen to verify that all nodes are connected. - Once all checks have passed, you can disable
Maintenance Modeand disableNode Drainfor each node.