Issues with the export/import feature

We are currently attempting to export projects from our default space to new one for each team using Octopus. During the import process, some projects are facing issues:

We found an archived thread and used the python script referenced here (Export/Import problem - #16 by darren.woodford). However, by using said script, as stated by the author, we would lose the releases history for the aforementioned projects.

I tried disabling the step referenced in the error, removing it from the projects themselves and deleting specified failed releases, to no avail.
For some of the projects that this step is included, the release history is mandatory to be kept.

Hi @victorion993,

Thanks for reaching out.

Sorry to hear you’re running into this. All of the workarounds I am seeing do involve losing release history, however, there is one thing you could try. It’s possible you could try going into every json for that 1.1.0.63 release and clean up the ActionTemplate IDs. This might be coming from the deployment process snapshot for that release.

Would you be able to try that and let me know if it works(on next import it complains about a different release)? If that works, it can also probably be done programmatically. If you’d like you can send me the export to take a look at the JSONs with you. (I won’t need the password since I won’t be importing it) You can either DM me, email support@octopus.com, or I can supply you with a secure upload link.

Best,
Jeremy

Hey Jeremy, thanks for reaching out.
The release in question I deleted and disabled the step it was referencing in the error message. A new release took its place and I tried deleting that one as well. As expected, another release that had the exact step appeared in their place.
After using the python script and removing all release history, the import worked, as stated previously.

1 Like

Hi @victorion993,

Thanks for the update. If you run into this in the future I think it would be possible for us to get the import to work without losing your release history but it would take a bit of scripting.

I’m glad to hear that your import worked. Please let me know if you have any other questions or concerns.

I hope you have a great weekend.

Best,
Jeremy

Even though the import worked, it’s less than ideal for us to lose release history.
Could you please send me a direct link so that i can post our export zip and let me know what needs to be done in order for us to not lose the entire history of releases.

I’ve sent you a DM with the link. Please let me know when you have finished the upload so I can take a look as I don’t get a notification.

Best,
Jeremy

Hey, i just uploaded the file and sent you reply on your DM

Thank you! I’m looking into it now.

Hey @victorion993,

I took a look at the zip and it looks like the deploymentprocess-Projects-6 jsons are using more Action Templates than are linked later as related documents. For example:

You can see 4 and 5 are listed as being used in this deployment process snapshot, those action templates are in the zip, but they aren’t listed as related document Ids. The way I did this was to load up all of the deployment process jsons in NotePad++ and did a search on ActionTemplates- and “found all in open documents”. The top half of each result section are the action templates being used in steps, and the bottom half are the related documents. If you see any that are missing, we could add them to the array.

We could try adding the document IDs to that array for all of the snapshots and then see if importing succeeds.

Would it be possible to get that screenshot of the error but with no censoring? I see it says it’s for release 1.0.63, but I don’t see that release in your zip. Has that one been deleted?

Could we also please do a system integrity check? You can find this on Configuration->Diagnostics->Run Check Now.

Please let me know if you have any questions or concerns.

Best,
Jeremy

Hello Jeremy,


I attached an unredacted import attempt.

Yes, the 1.0.63 release was the one I deleted in hopes it will be fixed. The export zip is exactly the same as the one I sent you previously.

The System integrity check was successful, no issues were found there

–UPDATE–

Sadly, adding the ActionTemplates to the deployment process json files did not resolve anything on our side and the import still fails with the same error.

Hey @victorion993,

Thanks for the update. That’s a bummer.

There is one more hail mary we can try. If you don’t ever intend on re-deploying these releases, you could potentially attempt to replace the deployment steps in those snapshots with something simple like 1 run a script step with write-host "hello". You would then want to clean up references to action templates at the bottom as well.

Please let me know if that’s something that you could try (if you don’t need to re-deploy), and if so if it works.

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.