Skip to main content

Veeam Backup For AWS Appliance Power On and Policy Run

  • September 9, 2024
  • 1 comment
  • 31 views

skitch210
Forum|alt.badge.img+1

As mentioned in my previous post -VRO Restore into AWS - https://community.veeam.com/vro-heroes-den-120/vro-restore-into-aws-custom-script-8341, the restore adds a tag to the restored VMs into AWS. This can be used to setup a protection policy in Veeam Backup for AWS and then we can use a script in VRO to power on the Backup Appliance so that our restored VMs will be protected.

 

This script is located at:

https://github.com/VeeamHub/veeam-orchestrator/tree/main/Start-VBAWS

 

Looking at the script, it starts by getting the AWS account information from the CSV file. Next it will get the Veeam backup for AWS appliance EC2 instance ID based on the name of the instance. Then it will start the instance. It will wait in a loop until the instance state is running, and that is it. Pretty simple. But before you can use the script, the Veeam backup for AWS appliance needs to be deployed and setup.

 

First thing is that a Veeam Backup for AWS appliance must be deployed into your AWS account. After the appliance has been deployed, create a policy to protect the VMs via the tag. Name the policy something that makes sense – like Backup-Yes (the tag). Specify the IAM role and region to protect. Under Resources – this is where we will use the tag. 

 

Here you see the tag and value. To add this, you will need an Instance in AWS that has this tag on it to add it in the policy.

 

Set the other settings based on your needs for backups and finish so the policy is created.

 

After the policy is created, if you do not need to protect workloads in AWS – like a DR only use case, then power off the appliance. DO not Terminate, just power off. You may want to set the appliance instance to have termination protection so that it does not get deleted by accident.

 

Make sure to set a name on the Appliance instance.

 

This is the name to put into the CSV file.

 

That is the appliance setup part, and it is off. Now we need to setup Orchestrator with a custom plan step that can be used to power it on.

 

Log into VRO and go into the Administration page, then select the Plan Steps. Click +Add.

Name the step something that makes sense – like Start VB AWS Appliance.

Under Script, browse to the powershell script to import into the step.

Under Parameters – Common Parameters, set Timeout to 1200, Retries to 0

                                    Execute Location, set Veeam Recovery Orchestrator Server

                                                (Post plan steps always execute on the Orchestrator server)

 

After adding the Plan Step, exit the Administration page. Under Recovery Plans, select the plan you want to add the step to. I recommend adding this to a Post Plan after the Recover to AWS from the previous post.

 

Select the Recovery Plan, then select the Post-Plan steps

 

Click Edit, make sure Post Plan steps is selected, under Steps – click +Add

 

After adding, click save.

 

Now the appliance should be running but depending on the schedule setup, it could be a while before the snapshots and backups run, so let’s add another script and step to start the policy right away to get a current backup.

 

Again, go into the VRO Administration – Plan Steps, and add the plan step. As the other one, set the Retries to 0 and set the Execution Location to Veeam Recovery Orchestrator Server. Here is the script to Run the Policy:

https://github.com/VeeamHub/veeam-orchestrator/tree/main/AWS-Policy-Run

 

Exit Administration and go to Recovery Plans. Select the plan you are using to restore into AWS. Edit the plan and select the Post Plan steps. Add this step after the start of the AWS Appliance.

 

This will connect to the VB for AWS Appliance via Rest API and will Run the policy to get a current snapshot of the restored VMs/Instances from the plan.

1 comment

Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 8449 comments
  • September 9, 2024

Every time I read a VRO post makes me want to test it more and more.  Thanks for sharing this one Marty.


Comment