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.
Moving from Azure SQL to AWS RDS
If you want to move your Octopus database from Azure SQL to AWS RDS, replace steps 3 and 4 in the step-by-step process with the steps below:
- Take a backup of your Azure SQL database (
- Download the
.bacpacbackup from Azure
- Import the
.bacpacbackup to a local SQL Server
- Create a standard SQL backup (
- Import the SQL backup into your AWS RDS database
Need support? We're here to help.