question

JaouhariYoussef-8168 avatar image
0 Votes"
JaouhariYoussef-8168 asked SadiqhAhmed-MSFT edited

How to launch first backup of Azure VM using Python SDK

Hello,

I want to launch the first backup of an Azure VM using Python SDK and I found out that there is no proper method for VMs that were never backed up in opposition to those who were backed up at least once.

Using the RecoveryServicesBackupClient at its latest known version, I am trying to trigger a backup for an item but it is mentioned that this item should be a protected one according to the documentation. Therefore having an unprotected item, I am looking for a method which would turn an unprotected item into a protected one but I could not find any which would do this.

I want to emphasize that this VM was never backed up before since the opposite leads to it being an protected item thus being available for retrieval using the trigger method shown before.



azure-backupazure-virtual-machines-backup
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @SadiqhAhmed-MSFT, sorry for the delay. After checking out the link provided, I confirm that it does answer the query that I formulated. If there any questions from my side then I will contact you accordingly. Thanks !

0 Votes 0 ·

1 Answer

SadiqhAhmed-MSFT avatar image
1 Vote"
SadiqhAhmed-MSFT answered SadiqhAhmed-MSFT edited

@JaouhariYoussef-8168 Thank you for contacting us!

From the details you provided I understand you want to enable Azure backup using Python and looing for a sample.
There are scripts attached to this thread - https://github.com/Azure/azure-sdk-for-python/issues/12878 Please try to use them and let us know how it goes.


If the response helped, do "Accept Answer" and up-vote it

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.