从 VM 窗格备份 SQL ServerBack up a SQL Server from the VM pane

本文说明如何使用 Azure 备份服务备份在 Azure VM 中运行的 SQL Server。This article explains how to back up SQL Server running in Azure VMs with the Azure Backup service. 可使用以下两种方法备份 SQL Server VM:You can back up SQL Server VMs using two methods:

  • 单个 SQL Server Azure VM:本文中的说明介绍如何直接通过 VM 视图备份 SQL Server VM。Single SQL Server Azure VM: The instructions in this article describe how to back up a SQL Server VM directly from the VM view.
  • 多个 SQL Server Azure VM:可设置一个恢复服务保管库,并为多个 VM 配置备份。Multiple SQL Server Azure VMs: You can set up a Recovery Services vault and configure backup for multiple VMs. 按照此文中针对该方案的说明操作。Follow the instructions in this article for that scenario.

开始之前Before you start

  1. 通过支持矩阵验证环境。Verify your environment with the support matrix.
  2. 获取 SQL Server VM 的 Azure 备份概述Get an overview of Azure Backup for SQL Server VM.
  3. 验证 VM 是否已建立网络连接Verify that the VM has network connectivity.

在 SQL Server 上配置备份Configure backup on the SQL Server

可通过 VM 中的“备份”窗格对 SQL Server VM 启用备份。You can enable backup on your SQL Server VM from the Backup pane in the VM. 此方法执行以下两项操作:This method does two things:

  • 向 Azure 备份服务注册 SQL VM 以授予其访问权限。Registers the SQL VM with the Azure Backup service to give it access.
  • 自动保护 VM 内运行的所有 SQL Server 实例。Autoprotects all the SQL Server instances running inside the VM. 这意味着备份策略将应用于所有现有数据库以及将来向这些实例添加的数据库。This means that the backup policy is applied to all the existing databases, as well as the databases that will be added to these instances in the future.
  1. 选择页面顶部的横幅以打开 SQL Server 备份视图。Select the banner on the top of the page to open the SQL Server backup view.

    SQL Server 备份视图

    备注

    看不到横幅?Don't see the banner? 仅对使用 Azure 市场映像创建的 SQL Server VM 显示横幅。The banner is only displayed for those SQL Server VMs that are created using Azure Marketplace images. 此外,还会对受 Azure VM 备份保护的 VM 显示。It's additionally displayed for the VMs that are protected with Azure VM Backup. 对于其他映像,可按此处所述配置备份。For other images, you can configure backup as explained here.

  2. 输入恢复服务保管库名称。Enter the Recovery Services vault name. 保管库是用于存储和管理所有备份的逻辑实体。A vault is a logical entity to store and manage all your backups. 如果创建新的保管库:If you create a new vault:

    • 它将在你要保护的 SQL Server VM 所在订阅和区域中进行创建。It will be created in the same subscription and region as the SQL Server VM that you're protecting.
    • 它将使用适合所有备份的异地冗余存储 (GRS) 设置进行创建。It will be created with the geo-redundant storage (GRS) setting for all the backups. 如果要更改冗余类型,应在保护 VM 之前进行操作。If you wish to change the redundancy type, you should do so before protecting the VM. 有关详细信息,请参阅此文章For more information, see this article.
  3. 选择备份策略。Choose a Backup Policy. 可选择默认策略,也可选择你在保管库中创建的任何其他现有策略。You can choose from the default policy, or any other existing policies that you created in the vault. 如果想要创建新策略,请参阅此文获取分步指南。If you want to create a new policy, you can refer to this article for a step-by-step guide.

    选择备份策略

  4. 选择“启用备份”。Select Enable Backup. 此操作可能需要几分钟才能完成。The operation may take a few minutes to complete.

    选择“启用备份”

  5. 操作完成后,横幅中会显示保管库名称。Once the operation is completed, you'll see the vault name in the banner.

    保管库名称显示在横幅中

  6. 选择横幅转到保管库视图,你可在这里看到所有已注册的 VM 及其保护状态。Select the banner to go the vault view, where you can see all the registered VMs and their protection status.

    显示已注册的 VM 的保管库视图

  7. 对于非市场映像,注册可能会成功,但在向 Azure 备份扩展授予对 SQL Server 的权限之前,可能不会触发“配置备份”。For non-marketplace images, the registration may be successful, but configure backup may not be triggered until the Azure Backup extension is given permission on the SQL Server. 在这种情况下,“备份就绪情况”列会显示“未就绪” 。In such cases, the Backup Readiness column reads Not Ready. 你需要为非市场映像手动分配适当权限,以便能够触发配置备份。You need to assign the appropriate permissions manually for non-marketplace images so configure backup can get triggered.

    备份就绪情况为“未就绪”

  8. 若要进一步操作或监视需要在备份的 SQL Server VM 上执行的操作,请转到相应的恢复服务保管库。For further operations or monitoring that you need to do on the backed-up SQL Server VM, go to the corresponding Recovery Services vault. 请转到“备份项”来查看在此保管库中备份的所有数据库,并触发按需备份和还原等操作。Go to Backup Items to see all the databases backed up in this vault, and trigger operations such as on-demand backup and restore. 同样,请转到“备份作业”来监视与配置保护、备份和还原等操作相关的作业。Similarly, go to Backup Jobs to monitor jobs corresponding to operations such as configure protection, backup, and restore.

    请参阅“备份项”中已备份的数据库

备注

对于以后可能会添加到受保护 VM 的任何新的 SQL Server 实例,不会自动配置备份。The backup isn't automatically configured on any of the new SQL Server instances that may be added later to the protected VM. 若要对新添加的实例配置备份,需要转到 VM 注册到的保管库,并按照此处列出的步骤操作。To configure backup on the newly added instances, you need to go the vault that the VM is registered to and follow the steps listed here.

后续步骤Next steps

了解如何:Learn how to: