< Back

Backup-AzureRmRecoveryServicesBackupItem

Tue Jan 29, 2019 10:00 pm

NAME Backup-AzureRmRecoveryServicesBackupItem



SYNOPSIS

Starts a backup for a Backup item.





SYNTAX

Backup-AzureRmRecoveryServicesBackupItem [-DefaultProfile <IAzureContextContainer>] [-ExpiryDateTimeUTC <DateTime>] -Item <ItemBase> [-Confirm]

[-WhatIf] [<CommonParameters>]





DESCRIPTION

The Backup-AzureRmRecoveryServicesBackupItem 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.



Set the vault context by using the Set-AzureRmRecoveryServicesVaultContext cmdlet before you use the current cmdlet.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

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



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ExpiryDateTimeUTC <DateTime>

Specifies an expiry time as a DateTime object.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Item <ItemBase>

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



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

DateTime

Parameter 'ExpiryDateTimeUTC' accepts value of type 'DateTime' from the pipeline



ItemBase

Parameter 'Item' accepts value of type 'ItemBase' from the pipeline





OUTPUTS

Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.JobBase







NOTES









Example 1: Start a backup for a Backup item



PS C:\\> $NamedContainer = Get-AzureRmRecoveryServicesBackupContainer -ContainerType AzureVM -Status Registered -Name "pstestv2vm1"

PS C:\\> $Item = Get-AzureRmRecoveryServicesBackupItem -Container $NamedContainer -WorkloadType AzureVM

PS C:\\> $Job = Backup-AzureRmRecoveryServicesItem -Item $Item

Operation Status StartTime EndTime JOBID

------------ --------- ------ --------- -------

pstestv2vm1 Backup InProgress 4/23/2016 5:00:30 PM cf4b3ef5-2fac-4c8e-a215-d2eba4124f27



The first command gets the Backup container of type AzureVM named pstestv2vm1, and then stores it in the $NamedContainer variable.



The second command gets the Backup item corresponding to the container in $NamedContainer, and then stores it in the $Item variable.



The last command triggers the backup job for the Backup item in $Item.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... backupitem

Get-AzureRmRecoveryServicesBackupContainer

Get-AzureRmRecoveryServicesBackupItem

Restore-AzureRmRecoveryServicesBackupItem