Skip to main content

Howdy Community,

I just uncovered an interesting situation that I wanted to share. I was brought a scenario where the goal was to deploy VBR via code. There was a snag with the job creation and we realized this dilemma:

  1. When creating a backup job that targets VDC Vault, the job requires encryption to be enabled.
  2. When creating jobs with Powershell, the job must first be created and then encryption settings are modified afterwards. 

The first thing I want to say about this is that it is indeed a known limitation that is scheduled to be fixed. :)

In the meantime, is there anything we can do about this? Yes! I wrote and published a sample script to show how I achieved this. The short version of this is:

  1. Create a temporary job to a non-Vault repository. 
  2. Enable encryption on the temporary job
  3. Clone the job targeting the Vault Repository

In detail, my sample does the following:

  1. Define your variables:
    1. Encryption Key
      1. I’m getting my key from an existing key already in the VBR System.
    2. VMName
      1. For this example, I kept it simple and used a single VM. 
    3. Job Names
      1. Define a Temp Job name, this will be deleted at the end of the script for cleanliness
      2. Define the Production Job Name, this is the job that will point to Vault and live on past the script.
    4. Description
      1. Add a description to the job as desired. 
    5. Repositories
      1. Default Repo, or whatever non-Vault repository you have. This will not hold any backups and is only used as a placeholder for the initial job creation.
      2. Vault Repo for the final result of the job creation.
  2. Create job
    1. Piped into this line: Enabled Encryption & Disable Synthetic Full backups
  3. Clone job with the target at Vault
  4. Delete the temp job.

Hopefully this comes in handy for someone out there. In the meantime, happy coding!

-AC

Very interesting dilema and workaround.  Thanks for sharing the script with the community. 👍🏼


Awesome! Could be very helpful in upscaling scenarios for larger environments or automated off-site branches. I’ll give it a shot in my lab to see if that works right after I managed to get VDC Vault running - maybe as a demo.