Backup-AzureRmBackupItem

Starts a backup for a Backup item.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Backup-AzureRmBackupItem
      [-Item] <AzureRMBackupItem>
      [-DefaultProfile <IAzureContextContainer>]
      [<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.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Item

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

Type:AzureRMBackupItem
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

AzureRMBackupItem

Parameters: Item (ByValue)

Outputs

AzureRMBackupJob