Import variableset from octo


I am trying to import a large variable set into a diffrent octopus server and facing issues while importing. No where in the documenatation you have defined what types we can use. Can you help in figuring out the way to import the variable sets and projects.

Would be great if you can give the command syntax with examples as this would be useful for larger community.

Thank you,
Kishore Garlapati

Hi Kishore,

Thanks for getting in touch! Can you show me an example of the script/code/commands you are using right now to export/import the large variable set? That way I can help steer you towards the best solution.

Just in case you are comfortable using C# this LINQPad script probably does almost exactly what you want:


I am using Octo.exe command
> octo import --server= --apiKey=API-KEYVALUE --type=LibraryVariable --filePath=".\vs-apppools.json"

Octopus Deploy Command Line Tool, version 4.39.1
Handshaking with Octopus server:
Handshake successful. Octopus version: 2018.7.14; API version: 3.0.0
Authenticated as: xxxxxxxxx <null>
Finding importer 'LibraryVariable'
Error: Unrecognized importer 'LibraryVariable'
Exit code: -1

also I tried POSTing through api and it just creates the variable name but not with vairables.

Hi Kishore,

Thanks for keeping in touch! The supported importers for octo.exe are only project and release. There is no specific importer for variableset.

There are a few choices on how you can proceed:

  1. If you really only want to copy a variable set from a source Octopus Server to a target Octopus Server, I would recommend exploring the code sample I sent you. This will allow you to be very specific, targeting the exact project + variable set you care about copying.
  2. If you actually want to copy other things, like the deployment process and project configuration from a source Octopus Server to a target Octopus Server, you can do this with octo.exe as described here, or you can use Octopus.Migrator.exe partial-export --project="MyProject" as described here.

If none of these options sound right to you, can you describe the problem you are trying to solve at a higher level so I can help you better?

Hope that helps!