I am trying to clone a space in Octopus. I am running the command:
.\CloneSpaceProject.ps1 -SourceOctopusUrl "https://deploy.octopus" `
-SourceOctopusApiKey "API-***************" `
-SourceSpaceName "MySpace" `
-DestinationOctopusUrl "https://deploy.octopus" `
-DestinationOctopusApiKey "API-********************" `
-DestinationSpaceName "MyNewSpace" `
I am cloning a space in the same instance. I have created the new space called MyNewSpace. I am Space manager in both the space I want to clone and the new space I created. I have created new API Keys too and still getting error.
I am getting the following error:
Even when I try to clone a space into a different instance I see the same issue.
Scripts are from - GitHub - OctopusDeployLabs/SpaceCloner: A tool to clone/sync a space, project, and/or other items between different spaces in the same Octopus Deploy instances or spaces in different instances.
Is there something simple that I am doing wrong?
Thanks for reaching out. Sorry to hear you’ve run into an issue with SpaceCloner. I’m not sure why this is happening, but I will investigate further.
I can see that you recently asked about Octopus Server 2021. Did you get a chance to upgrade? The reason I ask is that we introduced a new way of importing/exporting projects that may be a workaround to your issue. You can read more about that here.
Please let me know if the new import/export helps; otherwise, I’ll continue to investigate your SpaceCloner issue.
Thanks for your quick reply. No I put off upgrading to version 2021 so I am still on 2020.5.8 at the moment.
Sorry my mistake. I am now running:
CloneSpace.ps1 with extra commands like CloneScriptOptions added.
.\CloneSpace.ps1 -SourceOctopusUrl "https://octopus.local"
It looks like I have to follow the CloneScriptOptions in the script and I don’t see the error now and it clones everything I have selected as “all”
Great to hear you’re not seeing the error now. Thanks for letting me know.
Quick question. Is it possible to clone a project to a different space. Is cross space cloning supported?
Absolutely! Our Solutions team recently hosted a webinar where they demonstrated exporting and then importing a project to a different space. You can find the webinar recording at the bottom of the blog page, or jump straight into the demo section of the video here.
Is that only available on 2021 version?
Apologies, I thought you were asking about the new import/export feature.
Yes, for SpaceCloner you can use this script to set
Its good to know that new feature in 2021 with the Export/Import projects feature.
Thanks again for your help.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.