Restore-AzsBackup

Restore a backup.

Syntax

Restore-AzsBackup
       -Name <String>
       [-Location <String>]
       [-ResourceGroupName <String>]
       [-SubscriptionId <String>]
       [-DecryptionCertPassword <SecureString>]
       [-DecryptionCertPath <String>]
       [-RoleName <String>]
       [-DefaultProfile <PSObject>]
       [-AsJob]
       [-Force]
       [-NoWait]
       [-PassThru]
       [-Confirm]
       [-WhatIf]
       [<CommonParameters>]
Restore-AzsBackup
       -Name <String>
       -RestoreOption \<IRestoreOptions>
       [-Location <String>]
       [-ResourceGroupName <String>]
       [-SubscriptionId <String>]
       [-DefaultProfile <PSObject>]
       [-AsJob]
       [-Force]
       [-NoWait]
       [-PassThru]
       [-Confirm]
       [-WhatIf]
       [<CommonParameters>]
Restore-AzsBackup
       -INPUTOBJECT \<IBackupAdminIdentity>
       -RestoreOption \<IRestoreOptions>
       [-DefaultProfile <PSObject>]
       [-AsJob]
       [-Force]
       [-NoWait]
       [-PassThru]
       [-Confirm]
       [-WhatIf]
       [<CommonParameters>]
Restore-AzsBackup
       -INPUTOBJECT \<IBackupAdminIdentity>
       [-DecryptionCertPassword <SecureString>]
       [-DecryptionCertPath <String>]
       [-RoleName <String>]
       [-DefaultProfile <PSObject>]
       [-AsJob]
       [-Force]
       [-NoWait]
       [-PassThru]
       [-Confirm]
       [-WhatIf]
       [<CommonParameters>]

Description

Restore a backup.

Examples

Example 1: Restore Backup

PS C:\> Restore-AzsBackup -Name $backupResourceName -DecryptionCertPath $decryptionCertPath -DecryptionCertPassword $decryptionCertPassword

Restore from an Azure Stack backup.

Parameters

-AsJob

Run the command as a job

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DecryptionCertPassword

The password for the decryption certificate.

Type:System.Security.SecureString
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DecryptionCertPath

Path to the decryption cert file with private key (.pfx).

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:System.Management.Automation.PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Don't ask for confirmation

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.IBackupAdminIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Location

Name of the backup location.

Type:System.String
Position:Named
Default value:(Get-AzLocation)[0].Location
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the backup.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns true when the command succeeds

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Name of the resource group.

Type:System.String
Position:Named
Default value:"system.$((Get-AzLocation)[0].Location)"
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RestoreOption

Properties for restore options. To construct, see NOTES section for RESTOREOPTION properties and create a hash table.

Type:Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20180901.IRestoreOptions
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RoleName

The Azure Stack role name for restore, set it to empty for all infrastructure role

Type:System.String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:System.String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.IBackupAdminIdentity

Outputs

System.Boolean

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

INPUTOBJECT <IBackupAdminIdentity>: Identity Parameter

  • [Backup <String>]: Name of the backup.
  • [Id <String>]: Resource identity path
  • [Location <String>]: Name of the backup location.
  • [ResourceGroupName <String>]: Name of the resource group.
  • [SubscriptionId <String>]: Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

RESTOREOPTION <IRestoreOptions>: Properties for restore options.

  • [DecryptionCertBase64 <String>]: The certificate file raw data in Base64 string. This should be the .pfx file with the private key.
  • [DecryptionCertPassword <String>]: The password for the decryption certificate.
  • [RoleName <String>]: The Azure Stack role name for restore, set it to empty for all infrastructure role