How to copy all parameters from one environment to another


This article is going to tackle how to copy all of the parameters and all of their options from one environment to another via shell_plus.


  1. SSH into your Cloudbolt server with this command: 'ssh root@<cloudbolt_ip>'

    1. Make sure to replace <cloudbolt_ip> with the correct ip/dns of your Cloudbolt server

  2. Run this command to enter shell_plus: ‘/opt/cloudbolt/ shell_plus

  3. Make sure you grab the ID of both, the environment you want to copy to, and the one you’re copying from. You can find these by navigating to the environments detail page and looking at the number at the end of the URL.

  4. After you have the ID’s of both environments, you can enter these commands in order:

    main_env = Environment.objects.get(id=12)
    main_env_cfvs = main_env.custom_fields.all()
    main_env_options = main_env.custom_field_options.all()
    second_env = Environment.objects.get(id=13)

5. If you would like to copy the parameters to multiple different environments the code would chance slightly to look like this:

#IDs of all the secondary environments
empty_envs = [1, 2, 3, 4, 5, 6, 7]

main_env = Environment.objects.get(id=12)
main_env_cfs = main_env.custom_fields.all()
main_env_options = main_env.custom_field_options.all()

for env in empty_envs:
Have more questions? Submit a request


Please sign in to leave a comment.