This page outlines our recommended steps to move your SQL database to another server, without moving your Octopus server. The following is our advised approach to moving your Octopus database while retaining all of your data.
- Place your Octopus instance into Maintenance Mode and stop the service when all deployments have completed. You can stop the service via the Octopus Manager, or via the command line using the following command.
Octopus.Server.exe service --stop
- Ensure you have saved a copy of your master key.
- Take a backup of your Octopus database.
- Restore the database on your new server.
- On your original Octopus server, run the following command to update the connection string (where "VALUE" is your connection string).
Octopus.Server.exe database --connectionString="VALUE"
Ensure the user specified in the connection string has access to the database as a dbo_owner. Refer to our SQL server database documentation page.
When running the Octopus Deploy service as a Local System account, Windows Authentication can be used only if the SQL server instance is hosted on the same machine. To host SQL Server remotely, use SQL Server Authentication, or run the Octopus Deploy service as a custom account.