Current Setup:
Desired Setup:
Steps Taken:
Question: How can I achieve this setup without losing the data in RSV1? Is it absolutely necessary to move VM1 to a different resource group in order to add it to a new RSV?
Change the VM to use a new recovery services vault without lossing data.
I agree with the point you mentioned that azure doesnt support the same VM1 connecting with 2 recovery services & you need to move the VM to new temp RG.
Inorder to save the already saved backup data from RSV1 and connect the VM1 with RSV2 we need to follow the steps mentioned below
Intial setup:
Now the requirement is stopping the backup enabled in RSV1
Now in order to achive the requirement for linking up RSV2 with VM1 follow the steps below
Now move the VM1 to temperory resource group name which we just created above using the command
az resource move --destination-group RG_VM_Temp --ids $(az vm show --resource-group RG_VM --name VM1 --query id -o tsv)
This command will move the VM1 to new resource group we created RG_VM_temp
Now go to the resource group RG_VM and check of avaialblity of VM for RSV2
Once this done we connection with VM1 with RSV2 you can move the VM back to orginal resource group
az resource move --destination-group RG_VM --ids $(az vm show --resource-group RG_VM_Temp --name VM1 --query id -o tsv)
Refer:
https://learn.microsoft.com/en-us/azure/backup/backup-azure-backup-faq
https://learn.microsoft.com/en-us/cli/azure/resource?view=azure-cli-latest#az-resource-move