微软云 mysql 重启_备份和还原 - Azure 门户 - Azure Database for MySQL | Microsoft Docs

您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

如何使用 Azure 门户在 Azure Database for MySQL 中备份和还原服务器How to backup and restore a server in Azure Database for MySQL using the Azure portal

6/30/2020

本文内容

自动进行备份Backup happens automatically

Azure Database for MySQL 服务器定期进行备份以便启用还原功能。Azure Database for MySQL servers are backed up periodically to enable Restore features. 通过此功能,用户可将服务器及其所有数据库还原到新服务器上的某个较早时间点。Using this feature you may restore the server and all its databases to an earlier point-in-time, on a new server.

先决条件Prerequisites

若要完成本操作指南,需要:To complete this how-to guide, you need:

设置备份配置Set backup configuration

创建服务器时,可以在“定价层”窗口中选择将服务器配置为进行本地冗余备份或异地冗余备份。You make the choice between configuring your server for either locally redundant backups or geographically redundant backups at server creation, in the Pricing Tier window.

备注

创建服务器后,无法在异地冗余或本地冗余之间切换服务器冗余类型。After a server is created, the kind of redundancy it has, geographically redundant vs locally redundant, can't be switched.

通过 Azure 门户创建服务器时,在“定价层”窗口中为服务器选择是进行 本地冗余 备份还是 异地冗余 备份。While creating a server through the Azure portal, the Pricing Tier window is where you select either Locally Redundant or Geographically Redundant backups for your server. 也在此窗口中选择“备份保留期” - 希望存储服务器备份多长时间(天数)。This window is also where you select the Backup Retention Period - how long (in number of days) you want the server backups stored for.

4d6ec0e65fc249c05bf88ce286bff768.png

For more information about setting these values during create, see the Azure Database for MySQL server quickstart.

可以通过以下步骤更改服务器上的备份保留期:The backup retention period can be changed on a server through the following steps:

选择 Azure Database for MySQL 服务器。Select your Azure Database for MySQL server. 此操作将打开“概述”页。This action opens the Overview page.

在“设置”下,从菜单中选择“定价层”。Select Pricing Tier from the menu, under SETTINGS. 使用滑块可以根据需要更改 备份保留期(7 天到 35 天)。Using the slider you can change the Backup Retention Period to your preference between 7 and 35 days.

在下面的屏幕截图中,该项已增加到 34 天。In the screenshot below it has been increased to 34 days.

565e39323a4cbff62629eabb6bda53e5.png

单击“确定”确认更改。Click OK to confirm the change.

备份保留期控制可以往回检索多长时间的时间点还原,因为它基于可用备份。The backup retention period governs how far back in time a point-in-time restore can be retrieved, since it's based on backups available. 以下部分进一步说明了时间点还原。Point-in-time restore is described further in the following section.

时间点还原Point-in-time restore

使用 Azure Database for MySQL 可以将服务器还原到某个时间点,并还原到服务器的新副本。Azure Database for MySQL allows you to restore the server back to a point-in-time and into to a new copy of the server. 可以使用此新服务器恢复数据,或将客户端应用程序指向此新服务器。You can use this new server to recover your data, or have your client applications point to this new server.

例如,如果今天中午不小心删除了一张表,则可以将该表还原到中午之前的状态,并从服务器的新副本中检索丢失的表和数据。For example, if a table was accidentally dropped at noon today, you could restore to the time just before noon and retrieve the missing table and data from that new copy of the server. 时间点还原在服务器级别(而不是在数据库级别)进行。Point-in-time restore is at the server level, not at the database level.

以下步骤演示将示例服务器还原到某个时间点:The following steps restore the sample server to a point-in-time:

在 Azure 门户中,选择 Azure Database for MySQL 服务器。In the Azure portal, select your Azure Database for MySQL server.

在服务器“概述”页的工具栏中,选择“还原” 。In the toolbar of the server's Overview page, select Restore.

6b10ab0028f296dff00d35f08c93e510.png

使用必需信息填写“还原”窗体:Fill out the Restore form with the required information:

a76712cf6ce368095e2d602af220c9e0.png

还原点:选择要还原到的时间点。Restore point: Select the point-in-time you want to restore to.

目标服务器:提供新服务器的名称。Target server: Provide a name for the new server.

位置:不可选择区域。Location: You cannot select the region. 默认情况下,此值与源服务器相同。By default it is same as the source server.

定价层:执行时间点还原时,无法更改这些参数。Pricing tier: You cannot change these parameters when doing a point-in-time restore. 此值与源服务器相同。It is same as the source server.

单击“确定”,将服务器还原到某个时间点。Click OK to restore the server to restore to a point-in-time.

还原完成后,找到创建的新服务器,以验证数据是否已按预期还原。Once the restore finishes, locate the new server that is created to verify the data was restored as expected.

通过时间点还原创建的新服务器具有在所选时间点对现有服务器有效的相同服务器管理员登录名和密码。The new server created by point-in-time restore has the same server admin login name and password that was valid for the existing server at the point-in-time chose. 可以从新服务器的“概述”页更改密码。You can change the password from the new server's Overview page.

此外,还原操作完成后,有两个服务器参数将在还原操作后重置为默认值(而不是从主服务器复制)Additionally, after the restore operation finishes, there are two server parameters which are reset to default values (and are not copied over from the primary server) after the restore operation

time_zone - 此值设置为默认值“SYSTEM”time_zone - This value to set to DEFAULT value SYSTEM

event_scheduler - 还原服务器上的 event_scheduler 设置为“OFF”event_scheduler - The event_scheduler is set to OFF on the restored server

你将需要从主服务器复制该值,然后通过重新配置服务器参数在还原服务器上对其进行设置You will need to copy over the value from teh primary server and set it on the restored server by reconfiguring the server parameter

在还原期间创建的新服务器没有原始服务器上存在的 VNet 服务终结点。The new server created during a restore does not have the VNet service endpoints that existed on the original server. 需要为此新服务器单独设置这些规则。These rules need to be set up separately for this new server. 将从原始服务器还原防火墙规则。Firewall rules from the original server are restored.

异地还原Geo restore

如果为服务器配置了异地冗余备份,则可以从该现有服务器的备份创建新服务器。If you configured your server for geographically redundant backups, a new server can be created from the backup of that existing server. 可以在 Azure Database for MySQL 可用的任何区域中创建此新服务器。This new server can be created in any region that Azure Database for MySQL is available.

选择门户左上角的“创建资源”按钮 (+)。Select the Create a resource button (+) in the upper-left corner of the portal. 选择“数据库” > “Azure Database for MySQL”。Select Databases > Azure Database for MySQL.

cc0fd03faccc57091e1b8e2318b1e68d.png

提供新服务器的订阅、资源组和名称。Provide the subscription, resource group, and name of the new server.

选择“备份”作为“数据源”。Select Backup as the Data source. 此操作将加载一个下拉列表,其中提供已启用“异地冗余备份”的服务器列表。This action loads a dropdown that provides a list of servers that have geo redundant backups enabled.

d8e63b1a2c7a8ff0ff19bb247ee6ef58.png

备注

首次创建服务器时,该服务器可能不会立即可用于异地还原。When a server is first created it may not be immediately available for geo restore. 填充必需的元数据可能需要几个小时。It may take a few hours for the necessary metadata to be populated.

选择“备份”下拉列表。Select the Backup dropdown.

313462946b955414c8c245a6dfdabc1b.png

选择要从其还原的源服务器。Select the source server to restore from.

16a56abcaddc56ee432144dd074b36d7.png

服务器将默认设置为“vCore 数”、“备份保留期”、“备份冗余选项”、“引擎版本”和“管理凭据”的值。The server will default to values for number of vCores, Backup Retention Period, Backup Redundancy Option, Engine version, and Admin credentials. 选择“继续”。Select Continue.

b3d20af70d0093b06ad8e050f1a7e482.png

根据需要填写窗体的其余部分。Fill out the rest of the form with your preferences. 可以选择任意 位置。You can select any Location.

选择位置后,可以选择“配置服务器”以更新“计算代系”(如果在已选择的区域中可用)、“vCore 数”、“备份保留期”和“备份冗余选项”。After selecting the location, you can select Configure server to update the Compute Generation (if available in the region you have chosen), number of vCores, Backup Retention Period, and Backup Redundancy Option. 不支持在还原过程中更改 定价层(“基本”、“常规用途”或“内存优化”)或 存储 大小。Changing Pricing Tier (Basic, General Purpose, or Memory Optimized) or Storage size during restore is not supported.

a74948efd09abf64bc153cb8e35a1332.png

选择“查看 + 创建”,查看所选内容。Select Review + create to review your selections.

选择“创建”以预配服务器。Select Create to provision the server. 此操作可能需要几分钟的时间。This operation may take a few minutes.

通过异地还原创建的新服务器具有在启动还原时对现有服务器有效的相同服务器管理员登录名和密码。The new server created by geo restore has the same server admin login name and password that was valid for the existing server at the time the restore was initiated. 可以从新服务器的“概述” 页更改密码。The password can be changed from the new server's Overview page.

在还原期间创建的新服务器没有原始服务器上存在的 VNet 服务终结点。The new server created during a restore does not have the VNet service endpoints that existed on the original server. 需要为此新服务器单独设置这些规则。These rules need to be set up separately for this new server. 将从原始服务器还原防火墙规则。Firewall rules from the original server are restored.

后续步骤Next steps

详细了解服务的备份Learn more about the service's backups

了解副本Learn about replicas

详细了解业务连续性选项Learn more about business continuity options

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值