Upgrading Octopus 2018.1.4


So we are currently on version 2018.1.4 and realize that an upgrade to at least 2018.1.5 is needed to be able to use deploy to Azure Web Apps. The questions is would it be possible to directly upgrade to the latest stable version of Octopus without going through 2018.1.5 and not have issues ? This is to avoid upgrading multiple times in near future to reach the latest stable version say 2019.x.x…
Also, would be great if you could guide me to a well documented step by step process of upgrading it. Which includes restoring to previous version and database in case of any error that cannot be resolved quickly. Also, just to mention, we are using Azure SQL DB instance

Looking for a smooth upgrade here ! Thanks.

Hi @Sharjil!

You will generally be fine doing a single in-place upgrade from 2018.1.4 through to any later versions, with 2019.3 being our latest LTS (but we have a new LTS release coming out in July if that impacts your decision).

As for documentation, you are in luck! Heres a few links to the documentation you’ve requested:

I hope this helps! Please don’t hesitate to ask if you have any further questions.

Hey Justin,
Thank you so much for those links.
Although i have a few questions…

  1. Is the upgrade manual ?
  2. Do i need to manually backup database if im using Azure SQL Server Database which takes backup periodically for point in time restore ?
  3. If i need to, could you guide as to how can i please ?
  4. Which LTS version do you think we should go to since we are on 2018.1.4 now ?
  5. Do we need to manually upgrade the tentacle later ? Is it recommended or necessary ?
  6. Of course Master Key will be backed up !

Thanks plenty.


No problems at all @Sharjil!

  1. Upgrading is just a matter of running the updated installer, and following the steps.
  2. With Azure’s simple point-in-time recovery system, you shouldn’t need to do a full backup, as you’ll be able to restore you backup to a pre-upgrade state, if in the rare event, something goes awry with the upgrade.
  3. See above.
  4. I guess that depends on your timeframe, and if there are any additional features released since 2019.3 came out (https://octopus.com/downloads/compare?from=2019.4.1&to=2019.5.12) - I anticipate the new LTS to be out in the coming days.
  5. Tentacle upgrades can be done from inside the Octopus UI - you can push out an upgrade to all of your deployment targets automatically. Owing to the fact you’re migrating from a pre-spaces version, you shouldn’t need to upgrade these immediately (until you start adding spaces, in which case, you will need to upgrade to version 4.0.1 (the latest at the time of this post). But, as mentioned, this is easily handled from inside Octopus with the push of a button.
  6. Great news! You’re saving yourself a bunch of headaches :smiley:

Have a great day!

Hi Again @Justin_Walsh,

If i wish to perform a multi step upgrade, what version would you recommend we go to first before going to the 2019.3 LTS ?
Also, any checklist or prerequisites needed to perform or check before we kick off with the upgrade ?

Thanks !

Hi @Sharjil!

If you wanted to go to a multi-step process, I would recommend going from your existing 2018.1.4 version to 2018.10.7 (https://octopus.com/downloads/2018.10.7) and then from there up to 2019.3 or the newly-released 2019.6 LTS versions.

Checklists, naturally, would be obtaining a full backup (as mentioned above), and going through the change list to ensure that any of the new changes or features will not have any adverse affects on your configured deployment processes. I linked this above, but here’s the link again:
2019.3 LTS: https://octopus.com/downloads/compare?from=2018.1.4&to=2019.3.5
2019.6 LTS: https://octopus.com/downloads/compare?from=2018.1.4&to=2019.6.2

I wish you all the best with your upgrade! Please let me know if there’s anything else I can help you with!

Hey Justin,

While i have exported the database from the Azure SQL that we are using, but there is an option to export data on the octopus manager, is that any different or the same ?
Also im getting an error when i try to export data from the octopus manager as "SQL Error 18456 - Login failed for user “server admin account”



Sorry i got the export login failed thing working… found the correct password for it in the config file.
Thanks !

But when i tried to upgrade to 2018.10.7 LTS this is why it stopped… can you help here please ?
Error: SQLException has occured in statement #3 of this TSQL script: ‘Octopus.Core.UpgradeScripts.Script0116 - Add Machine Columns.sql’; Line: 15; Procedure: ; Error Number: 537; Excerpt: ‘UPDATE Machine’; Message: Invalid length parameter passed to the LEFT or SUBSTRING function.
Error: The statement has been terminated.
Error: Extracting RelatedDocumentIds to a column (Part 1/2)
Error: Extracting RelatedDocumentIds to a column (Part 2/2)
Error occured when executing scripts, transaction will be rolled back
Error: Upgrade failed due to an unexpected exception:
Error: System.Data.SqlClient.SqlException (0x80131904): Invalid length parameter passed to the LEFT or SUBSTRING function.
Error: The statement has been terminated.
Error: Extracting RelatedDocumentIds to a column (Part 1/2)
Error: Extracting RelatedDocumentIds to a column (Part 2/2)
Error: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) Error: at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) Error: at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) Error: at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() Error: at System.Data.SqlClient.SqlDataReader.get_MetaData() Error: at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) Error: at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) Error: at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
Error: at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
Error: at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
Error: at DbUp.Support.ScriptExecutor.ExecuteAndLogOutput(IDbCommand command)
Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.<>c__DisplayClass7_0.b__0(Func1 commandFactory) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Core\Initialization\DatabaseUpgrader.cs:line 352 Error: at DbUp.Engine.Transactions.SingleTrasactionStrategy.Execute(Action1 action)
Error: at Octopus.Core.Initialization.DatabaseUpgrader.OctopusUpgradeScriptExecutor.Execute(SqlScript script, IDictionary`2 variables) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Core\Initialization\DatabaseUpgrader.cs:line 283
Error: at DbUp.Engine.UpgradeEngine.PerformUpgrade()
Error: ClientConnectionId:4345a878-c6d3-426b-bb9e-a7f9afa2e2c9
Error: Error Number:537,State:3,Class:16
Error: ClientConnectionId before routing:c57b288f-26c1-48b7-a009-54cec42a764c
Error: Routing Destination:f4b6446baf3f.tr18.westeurope1-a.worker.database.windows.net,11195
Error: We encountered an error during the schema upgrade. The schema upgrade was stopped and rolled back. Don’t worry, this means we haven’t made any changes to your data, and you should be able to get back up and running quickly.

Hey @Justin_Walsh ,

Since this LTS version did not work, do you suggest any lower version maybe ?
Also, maybe you could guide on what caused this error on upgrade please

Hey @Kenneth_Bates,

I read a post earlier which describes a similar issue ( Octopus upgrade failed ) that we are facing with the upgrade from 2018.5.7 to any of the later versions but its fails as described above.
However, i could not see any written conclusion on that thread and maybe it was closed over a call.
Can you also let me know if there is a anything that we are missing.

Thanks !

Hi Sharjil,
I was assigned the following ticket, Upgrade failing to 2018.10.7 from 2018.1.4, that looks to be related to the upgrade challenges you’ve reported in this ticket.

If this is the same issue and you’re still having difficulty with the upgrade, I’d like to continue to help you in this thread.
Please let me know if these tickets are not related, or if you have moved passed this error, which I hope you have!

I apologize for any confusion and look forwarding to hearing from you shortly.

Hello Tina,

Thank you so much. Its a relief to get a response considering we are really stuck on the upgrade and there seems to be no solution out there.

So to answer to your question, the issue still persists (it is the same) and i am still not able to upgrade to any later version.



Hi Sharjil,
Thanks for the sponse. Sorry to hear you’re still having issues with your upgrade.

I’d like to ask some followup question but I’m going to redirect us to your new ticket and work with you there.

Thanks for your patients.