Backup-​Azure​Rm​Backup​Item

Starts a backup for a Backup item.

Syntax

Backup-AzureRmBackupItem
      [-Item] <AzureRMBackupItem>
      [<CommonParameters>]

Description

The Backup-AzureRmBackupItem cmdlet starts a backup for a protected Azure Backup item that is not tied to the backup schedule. You can do an initial backup immediately after you enable protection or start a backup after a scheduled backup fails.

If an existing backup job is running, this cmdlet fails.

Examples

Example 1: Start to back up a virtual machine

PS C:\>$Vault = Get-AzureRmBackupVault -Name "Vault03"
PS C:\> $Container = Get-AzureRmBackupContainer -Vault $Vault -Type AzureVM -Name "DPMSERVER.CONTOSO.COM"
PS C:\> Get-AzureRmBackupItem -Container $Container | Backup-AzureRmBackupItem
WorkloadName    Operation       Status          StartTime              EndTime
------------    ---------       ------          ---------              -------
co03-vm         Backup          InProgress      26-Aug-15 12:24:01 PM  01-Jan-01 12:00:00 AM

The first command gets the vault named Vault03 by using the Get-AzureRmBackupVault cmdlet. The command stores that object in the $Vault variable.

The second command gets a container that has the specified name in the vault in $Vault by using the Get-AzureRmBackupContainer cmdlet. The command stores that object in the $Container variable.

The last command gets the backup items in $Container by using the Get-AzureRmBackupItem cmdlet. The command passes the items to the current cmdlet by using the pipeline operator. The current cmdlet starts backing up the virtual machine in the container.

Required Parameters

-Item

Specifies a Backup item for which this cmdlet starts a backup operation.

Type:AzureRMBackupItem
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Inputs

AzureRMBackupItem

Outputs

AzureRmBackupJob