Soru

Zorluk: OrtaAzure Virtual Machine Backup Configuration

You have an Azure virtual machine named VM1 in the East US region. You need to configure Azure Backup for VM1 to store backups in a Recovery Services vault and immediately perform the initial backup. You plan to automate the setup using Azure PowerShell. Which sequence of Azure PowerShell cmdlets should you execute?

  1. 1Run `New-AzRecoveryServicesVault` to create the Recovery Services vault.
  2. 2Run `Set-AzRecoveryServicesVaultContext` to set the active vault context.
  3. 3Run `Enable-AzRecoveryServicesBackupProtection` to associate the virtual machine with a backup policy.
  4. 4Run `Backup-AzRecoveryServicesBackupItem` to trigger the initial backup.

Cevap

To configure and run the initial backup using Azure PowerShell, you must first run `New-AzRecoveryServicesVault` to create the vault. Next, run `Set-AzRecoveryServicesVaultContext` to set the vault as the active context for your session. Then, run `Enable-AzRecoveryServicesBackupProtection` to register the virtual machine and assign a backup policy. Finally, execute `Backup-AzRecoveryServicesBackupItem` to run the initial backup immediately.
The correct order establishes the prerequisite storage resource, points the session to the target resource, configures policy protection rules for the virtual machine, and then executes the backup job.

Adım Adım Çözüm

1
Create the Recovery Services vault.
A vault resource is provisioned in Azure.
All backup configuration parameters and recovery points reside within a Recovery Services vault.
2
Configure the active vault session context.
The PowerShell session targets the correct vault resource.
Setting the vault context ensures that subsequent management commands execute against this specific vault.
3
Enable backup protection for the virtual machine.
The virtual machine is registered to the vault and associated with a policy.
A virtual machine must be bound to a policy within the vault before any backups can be executed.
4
Trigger the initial backup job.
An on-demand backup job begins running.
Enabling protection schedules backups, but an explicit call to backup is required to generate the first recovery point immediately.

Anahtar Kavram

Configuring Azure Virtual Machine backups using Azure PowerShell cmdlets.
Tahmini Süre:2m 0s
Bu soruyu puanla