用户定义的还原点User-defined restore points

本文介绍如何使用 PowerShell 和 Azure 门户为 Azure SQL 数据仓库创建新的用户定义的还原点。In this article, you learn to create a new user-defined restore point for Azure SQL Data Warehouse using PowerShell and Azure portal.

通过 PowerShell 创建用户定义的还原点Create user-defined restore points through PowerShell

若要创建用户定义的还原点,请使用 New-AzSqlDatabaseRestorePoint PowerShell cmdlet。To create a user-defined restore point, use the New-AzSqlDatabaseRestorePoint PowerShell cmdlet.

  1. 开始之前,请确保安装 Azure PowerShellBefore you begin, make sure to install Azure PowerShell.
  2. 打开 PowerShell。Open PowerShell.
  3. 连接到 Azure 帐户,并列出与帐户关联的所有订阅。Connect to your Azure account and list all the subscriptions associated with your account.
  4. 选择包含要还原的数据库的订阅。Select the subscription that contains the database to be restored.
  5. 为数据仓库的即时复制创建还原点。Create a restore point for an immediate copy of your data warehouse.

$SubscriptionName="<YourSubscriptionName>"
$ResourceGroupName="<YourResourceGroupName>"
$ServerName="<YourServerNameWithoutURLSuffixSeeNote>"  # Without database.chinacloudapi.cn
$DatabaseName="<YourDatabaseName>"
$Label = "<YourRestorePointLabel>"

Connect-AzAccount -Environment AzureChinaCloud
Get-AzSubscription
Select-AzSubscription -SubscriptionName $SubscriptionName

# Create a restore point of the original database
New-AzSqlDatabaseRestorePoint -ResourceGroupName $ResourceGroupName -ServerName $ServerName -DatabaseName $DatabaseName -RestorePointLabel $Label

  1. 查看所有现有还原点的列表。See the list of all the existing restore points.
# List all restore points
Get-AzSqlDatabaseRestorePoints -ResourceGroupName $ResourceGroupName -ServerName $ServerName -DatabaseName $DatabaseName

通过 Azure 门户创建用户定义的还原点Create user-defined restore points through the Azure portal

还可以通过 Azure 门户创建用户定义的还原点。User-defined restore points can also be created through Azure portal.

  1. 登录到 Azure 门户帐户。Sign in to your Azure portal account.

  2. 导航到要为其创建还原点的 SQL 数据仓库。Navigate to the SQL Data Warehouse that you want to create a restore point for.

  3. 从左窗格中选择“概述” ,选择“+ 新建还原点” 。Select Overview from the left pane, select + New Restore Point. 如果“新建还原点”按钮未启用,请确保数据仓库未暂停。If the New Restore Point button isn't enabled, make sure that the data warehouse isn't paused.

    新建还原点

  4. 为用户定义的还原点指定名称,然后单击“应用” 。Specify a name for your user-defined restore point and click Apply. 用户定义的还原点的默认保留期为七天。User-defined restore points have a default retention period of seven days.

    还原点的名称

后续步骤Next steps