Database migration fails at Version rules when restoring Channels


(Keith) #1

I’m trying to move my Octopus installation to a new server. I have backed up my database using the Export Wizard and am restoring it via the Import Wizard within the Octopus Manager. All looks fine until the SQL script fails with the following error:

Error: 6 errors were encountered
Error: Channels-5: Version rules must specify a package step
Error: Channels-46: Version rules must specify a package step
Error: Channels-85: Version rules must specify a package step
Error: Channels-6: Version rules must specify a package step
Error: Channels-47: Version rules must specify a package step
Error: Channels-84: Version rules must specify a package step
Error: The transaction will be rolled back
Error: 6 errors were encountered
Error: The previous command returned a non-zero exit code of: 1
Error: The command that failed was: “C:\Program Files\Octopus Deploy\Octopus\Octopus.Migrator.exe” import --instance “OctopusServer” --directory “C:\Temp\Octopus.2018-11-14\Octopus.2018-11-14” --password “xxxxx” --overwrite

I’ve found the channels in question and all of them have a channel version set, as per the attached image. Please advise what I’m doing wrong, or perhaps this is an import or export error?

Migrator assembly version 2018.9.2+Branch.master.Sha.4ff03b1d32129607ad4d41e92b4dd770697ed6a2


(Michael Noonan) #2

Hi Keith,

Thanks for getting in touch! Thanks for telling us about this problem. I’ve logged it so we can take a good look at what is going wrong.

If you want to move your Octopus Server to a new machine/database - the best approach is to use a plain old SQL backup and restore:


Hope that helps!
Mike


(Michael Noonan) #4

Hi Keith,

How did you go moving your database with the help of our documentation?

Regarding the error you saw: @Michael_Richardson and I were looking at this earlier. Our working theory is that you are trying to migrate data between different versions of Octopus Server. Can you confirm which versions of Octopus Server you were running on the Source and Destination?

Hope that helps!
Mike


(Keith) #5

Hi, thank you for both of your replies.

Indeed you’re correct - I am using different versions between import and export. I thought I was running the latest but turns I was using:

Export: Octopus 2018.8.8
Import: Octopus: 2018.9.2

Further to your earlier comment, I’ll try the SQL export/import instead (if I get can SSMS onto the old machine). Failing that I’ll upgrade the instance and try the export/import wizard again.

Thanks for your help!
Keith


(Michael Noonan) #6

Hi Keith,

Thanks for keeping in touch. If you are indeed trying to move your entire server and its data, I would strongly recommend the SQL database backup/restore approach. :slight_smile:

Good hunting!
Mike