Version of Octopus: 2019.4.1
I’m trying to do a partial-export with Octopus.Migrator.exe and new argument --sourceSpaceId, but I get error:
*Octopus.Migrator.exe : Unrecognized command line arguments: --sourceSpaceId=Spaces-1*
Im running it like this:
*& "C:\Program files\Octopus Deploy\Octopus\Octopus.Migrator.exe" partial-export --sourceSpaceId="Spaces-1" --project="$projectName" --password=$migrationPassword --directory=$exportPath*
Am I doing something wrong?
Thanks for reporting that issue. First, could you please try it again without the
--sourceSpaceId parameter? i.e. like this:
*& "C:\Program files\Octopus Deploy\Octopus\Octopus.Migrator.exe" partial-export --project="$projectName" --password=$migrationPassword --directory=$exportPath*
The space ID should be automatically determined by finding matching projects, so there’s no longer any need to specify the
Sorry if our documentation led you astray in this case! We’ll be sure to update the docs to reflect the new options.
Just let me know how you go with that
thanks for response.
Without sourceSpaceId it works. And as you say, this document made me try it:
But then I got a new question regarding this:
If I do partial-export for a specific project it still exports some data from my other Space. What I’ve noticed: Environments and Accounts
Is their a way to only export data for a specific Space?
Thanks Tobias, I’m glad that worked for you. The documentation has now been updated - good catch
I’ve reproduced the behavior you’re seeing with regards to Environments and Accounts, and I think you’ve found a bug. Sorry about that! I’ve logged this issue so we can make sure we follow up on it: https://github.com/OctopusDeploy/Issues/issues/5593
In the meantime, I’d like to help you find a suitable workaround. Can you tell me a bit more about how you’re planning to use the partial export?
All of the documents should have the space ID written in their filename (e.g. “Spaces-1.Production.json”). I’m wondering if it would be feasible for you to use that filename to ignore/exclude any exported files which are not from the desired space. Would that workaround be sufficient to keep you going in the meantime?
Will use partial export to export projects from one server to another. The server we export from will have two spaces, but the server for import will only have the default space.
That workaround will work for us, we can ignore files that starts with “Spaces-2”.
Just a note:
It looks like TagSets from my other Space also is included in the export.
Thanks for that detail Tobias! We’ll follow up via https://github.com/OctopusDeploy/Issues/issues/5593