external help file | Module Name | online version | schema |
---|---|---|---|
Az.MySql-help.xml |
Az.MySql |
2.0.0 |
Restore a server from an existing backup
Restore-AzMySqlFlexibleServer -Name <String> -ResourceGroupName <String> [-SubscriptionId <String>]
-RestorePointInTime <DateTime> -InputObject <IServerAutoGenerated> [-Zone <String>] [-Subnet <String>]
[-PrivateDnsZone <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Restore a server from an existing backup
$restorePointInTime = (Get-Date).AddMinutes(-10)
Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | Restore-AzMySqlFlexibleServer -Name mysql-test-restore -ResourceGroupName PowershellMySqlTest -RestorePointInTime $restorePointInTime
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
---- -------- ------- ------- ------------------ ------- -------------
mysql-test-restore West US 2 Standard_D2ds_v4 GeneralPurpose admin 5.7 32
These cmdlets restore MySql server using PointInTime Restore.
$restorePointInTime = (Get-Date).AddMinutes(-10)
Get-AzMySqlFlexibleServer -ResourceGroupName PowershellMySqlTest -ServerName mysql-test | Restore-AzMySqlFlexibleServer -Name mysql-test-restore -ResourceGroupName PowershellMySqlTest -RestorePointInTime $restorePointInTime -Subnet <SubnetId> -PrivateDnsZone <PrivateDnsZoneId>
Name Location SkuName SkuTier AdministratorLogin Version StorageSizeGb
---- -------- ------- ------- ------------------ ------- -------------
mysql-test-restore West US 2 Standard_D2ds_v4 GeneralPurpose admin 5.7 32
These cmdlets restore MySql server using PointInTime Restore either from private access server to different private access resources or from public access server to private access server.
Run the command as a job.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The credentials, account, tenant, and subscription used for communication with Azure.
Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The source server object to restore from. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: Microsoft.Azure.PowerShell.Cmdlets.MySql.Models.Api20210501.IServerAutoGenerated
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The name of the server.
Type: System.String
Parameter Sets: (All)
Aliases: ServerName
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Run the command asynchronously.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The id of an existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. The suffix of dns zone has to be same as that of fully qualified domain of the server.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of the resource group that contains the resource, You can obtain this value from the Azure Resource Manager API or the portal.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The location the resource resides in.
Type: System.DateTime
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The id of an existing Subnet the private access server will created to. Please note that the subnet will be delegated to Microsoft.DBforMySQL/flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The subscription ID that identifies an Azure subscription.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: False
Availability zone into which to provision the resource.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.