다음을 통해 공유


Restore-AzsBackup

Restore a backup.

Syntax

RestoreExpanded (Default)

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

Restore-AzsBackup
    -Name <String>
    -RestoreOption
    [-Location <String>]
    [-ResourceGroupName <String>]
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-Force]
    [-NoWait]
    [-PassThru]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

RestoreViaIdentity

Restore-AzsBackup
    -INPUTOBJECT
    -RestoreOption
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-Force]
    [-NoWait]
    [-PassThru]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

RestoreViaIdentityExpanded

Restore-AzsBackup
    -INPUTOBJECT
    [-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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DecryptionCertPassword

The password for the decryption certificate.

Parameter properties

Type:System.Security.SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RestoreExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DecryptionCertPath

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RestoreExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:System.Management.Automation.PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Don't ask for confirmation

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

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

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.IBackupAdminIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RestoreViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Location

Name of the backup location.

Parameter properties

Type:System.String
Default value:(Get-AzLocation)[0].Location
Supports wildcards:False
DontShow:False

Parameter sets

Restore
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of the backup.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Restore
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NoWait

Run the command asynchronously

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassThru

Returns true when the command succeeds

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

Name of the resource group.

Parameter properties

Type:System.String
Default value:system.$((Get-AzLocation)[0].Location)
Supports wildcards:False
DontShow:False

Parameter sets

Restore
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RestoreOption

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

Parameter properties

Type:Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20180901.IRestoreOptions
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Restore
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreViaIdentity
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RoleName

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

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RestoreExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

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

Parameter properties

Type:System.String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

Restore
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RestoreExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

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