Upravit

Sdílet prostřednictvím


Restore-AzNetAppFilesSnapshotFile

Restore the specified files from the specified snapshot to the active filesystem

Syntax

Restore-AzNetAppFilesSnapshotFile
       -ResourceGroupName <String>
       -AccountName <String>
       -PoolName <String>
       -VolumeName <String>
       [-Name <String>]
       -FilePath <String[]>
       [-DestinationPath <String>]
       [-PassThru]
       [-DefaultProfile <IAzureContextContainer>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restore-AzNetAppFilesSnapshotFile
       [-Name <String>]
       -FilePath <String[]>
       [-DestinationPath <String>]
       -ResourceId <String>
       [-PassThru]
       [-DefaultProfile <IAzureContextContainer>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Restore-AzNetAppFilesSnapshotFile
       [-Name <String>]
       -FilePath <String[]>
       [-DestinationPath <String>]
       -VolumeObject <PSNetAppFilesVolume>
       [-PassThru]
       [-DefaultProfile <IAzureContextContainer>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

Restore the specified files from the specified snapshot to the active filesystem

Examples

Example 1

Restore-AzNetAppFilesSnapshotFile -ResourceGroupName "MyRG" -AccountName "MyAnfAccount" -PoolName "MyAnfPool" -VolumeName "MyVolume" -Name "MySnapshotName" -FilePath "/dir1/customer1.db" -DestinationPath "/AVSdataStore"

This command Restores the files provided in FilePath to the directory /AVSdataStore from the MyVolume snapshot called MySnapshotName

Parameters

-AccountName

The name of the ANF account

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationPath

Destination folder where the files will be restored

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

-FilePath

List of files to be restored

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

-Name

The name of the ANF snapshot

Type:String
Aliases:SnapshotName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Return whether the specified files where successfully restored

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PoolName

The name of the ANF pool

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

-ResourceGroupName

The resource group of the ANF volume

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

-ResourceId

The resource id of the ANF snapshot

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

-VolumeName

The name of the ANF volume

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

-VolumeObject

The volume object containing the snapshot

Type:PSNetAppFilesVolume
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

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

Inputs

String

PSNetAppFilesVolume

Outputs

PSNetAppFilesSnapshot