azure mysql 实时同步_Azure Database for MySQL 灵活的服务器中的备份和还原 | Microsoft Docs...

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

Azure Database for MySQL 灵活的服务器 (预览版中的备份和还原)Backup and restore in Azure Database for MySQL Flexible Server (Preview)

09/21/2020

本文内容

重要

Azure Database for MySQL 灵活服务器当前以公共预览版提供。Azure Database for MySQL - Flexible Server is currently in public preview.

Azure Database for MySQL 灵活的服务器,会自动创建服务器备份并将其安全地存储在区域内的本地冗余存储中。Azure Database for MySQL Flexible Server, automatically creates server backups and securely stores them in local redundant storage within the region. 备份可以用来将服务器还原到某个时间点。Backups can be used to restore your server to a point-in-time. 备份和还原是任何业务连续性策略的基本组成部分,因为它们可以保护数据免遭意外损坏或删除。Backup and restore are an essential part of any business continuity strategy because they protect your data from accidental corruption or deletion.

备份概述Backup overview

灵活的服务器采用数据文件的快照备份,并将它们存储在本地冗余存储中。Flexible Server takes snapshot backups of the data files and stores them in a local redundant storage. 服务器还会执行事务日志备份,并将它们存储在本地冗余存储中。The server also performs transaction logs backup and also stores them in local redundant storage. 可以通过这些备份将服务器还原到所配置的备份保留期中的任意时间点。These backups allow you to restore a server to any point-in-time within your configured backup retention period. 默认的备份保留期为七天。The default backup retention period is seven days. 你可以选择将数据库备份配置为1到35天。You can optionally configure the database backup from 1 to 35 days. 所有备份都使用 AES 256 位加密为静态存储的数据加密。All backups are encrypted using AES 256-bit encryption for the data stored at rest.

无法导出这些备份文件。These backup files cannot be exported. 备份仅可用于在灵活的服务器中执行还原操作。The backups can only be used for restore operations in Flexible server. 你还可以使用 MySQL 客户端中的 mysqldump 来复制数据库。You can also use mysqldump from a MySQL client to copy a database.

备份频率Backup frequency

灵活服务器上的备份基于快照。Backups on flexible servers are snapshot-based. 第一次完整快照备份在创建服务器后立即进行计划。The first full snapshot backup is scheduled immediately after a server is created. 第一次完整快照备份将作为服务器的基准备份保留。That first full snapshot backup is retained as the server's base backup. 后续快照备份仅为差异备份。Subsequent snapshot backups are differential backups only.

一天至少进行一次差异快照备份。Differential snapshot backups occur at least once a day. 差异快照备份不按固定计划进行。Differential snapshot backups do not occur on a fixed schedule. 差异快照备份每 24 小时进行一次,除非自上次差异备份后 MySQL 中的二进制日志超过 50 GB。Differential snapshot backups occur every 24 hours unless the binary logs in MySQL exceeds 50-GB since the last differential backup. 一天内,最多允许有 6 张差异快照。In a day, a maximum of six differential snapshots are allowed. 事务日志备份每五分钟进行一次。Transaction log backups occur every five minutes.

备份保留Backup retention

数据库备份存储在本地冗余存储 (LRS) 中,存储在区域内的三个副本中。Database backups are stored in a local redundant storage (LRS)-- which is stored in three copies within a region. 根据服务器上的备份保持期设置来保留备份。Backups are retained based on the backup retention period setting on the server. 你可以选择1到35天的保留期,默认保留期为七天。You can select a retention period of 1 to 35 days with a default retention period is seven days. 可以通过使用 Azure 门户更新备份配置,在创建服务器或更高版本期间设置保留期。You can set the retention period during server creation or later by updating the backup configuration using Azure portal.

备份保留期控制执行时间点还原操作的时间间隔,因为它基于可用的备份。The backup retention period governs how far back in time can a point-in-time restore operation be performed, since it's based on backups available. 从恢复的角度来看,备份保留期也可以视为恢复时段。The backup retention period can also be treated as a recovery window from a restore perspective. 在备份保留期间内执行时间点还原所需的所有备份都保留在备份存储中。All backups required to perform a point-in-time restore within the backup retention period are retained in backup storage. 例如,如果备份保持期设置为七天,则会将恢复时段视为过去7天。For example - if the backup retention period is set to seven days, the recovery window is considered last seven days. 在这种情况下,将保留在过去7天内还原服务器所需的所有备份。In this scenario, all the backups required to restore the server in last seven days are retained. 如果备份保留时段为七天,则数据库快照和事务日志备份将在窗口) 之前的过去八天内存储 (1 天。With a backup retention window of seven days, database snapshots and transaction log backups are stored for the last eight days (1 day prior to the window).

备份存储成本Backup storage cost

灵活的服务器最多可提供100% 的预配服务器存储作为备份存储,无需额外付费。Flexible server provides up to 100% of your provisioned server storage as backup storage at no additional cost. 超出的备份存储使用量按每月每 GB 标准收费。Any additional backup storage used is charged in GB per month. 例如,如果你预配了具有 250 GB 存储空间的服务器,则服务器备份有 250 GB 的存储空间,无需额外付费。For example, if you have provisioned a server with 250 GB of storage, you have 250 GB of storage available for server backups at no additional charge. 如果每日备份使用量为25GB,则最多可以有10天的免费备份存储空间。If the daily backup usage is 25GB, then you can have up to 10 days of free backup storage. 备份所消耗的存储量超过 250GB 将按照定价模型收费。Storage consumed for backups more than 250 GB is charged as per the pricing model.

可以使用 Azure 门户中提供的 Azure Monitor 中的已使用的备份存储指标来监视服务器使用的备份存储。You can use the Backup Storage used metric in Azure Monitor available in the Azure portal to monitor the backup storage consumed by a server. "使用的 备份存储 " 指标表示根据为服务器设置的备份保留期保留的所有数据库备份和日志备份占用的存储量。The Backup Storage used metric represents the sum of storage consumed by all the database backups and log backups retained based on the backup retention period set for the server. 无论数据库的总大小如何,如果服务器上的事务性活动繁重,都会导致备份存储使用率增加。Heavy transactional activity on the server can cause backup storage usage to increase irrespective of the total database size.

控制备份存储成本的主要方法是设置适当的备份保留期。The primary means of controlling the backup storage cost is by setting the appropriate backup retention period. 你可以选择介于1到35天之间的保留期。You can select a retention period between 1 to 35 days.

重要

从主数据库服务器进行在区域冗余高可用性配置中配置的数据库服务器备份,因为快照备份的开销较低。Backups from a database server configured in a zone redundant high availability configuration happens from the primary database server as the overhead is minimal with snapshot backups.

重要

灵活的服务器当前不支持异地冗余备份。Geo-redundant backups are currently not supported with flexible server.

时间点还原Point-in-time restore

在 Azure Database for MySQL 灵活的服务器中,执行时间点还原将从与源服务器相同的区域中的灵活服务器的备份创建新的服务器。In Azure Database for MySQL Flexible Server, performing a point-in-time restore creates a new server from the flexible server's backups in the same region as your source server. 它是在计算层的原始服务器配置、Vcore 数、存储大小、备份保留期和备份冗余选项的情况下创建的。It is created with the original server's configuration for the compute tier, number of vCores, storage size, backup retention period, and backup redundancy option. 此外,还会从源服务器继承标记和设置,例如虚拟网络和防火墙。Also, tags and settings such as virtual network and firewall are inherited from the source server. 还原完成后,可以更改还原的服务器的计算和存储层、配置和安全设置。The restored server's compute and storage tier, configuration and security settings can be changed after the restore is completed.

备注

还原操作完成后,有两个服务器参数重置为默认值(而不是从主服务器复制)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

多种情况下可以使用时间点还原。Point-in-time restore is useful in multiple scenarios. 常见的一些用例包括-Some of the use cases that are common include -

当用户意外删除数据库中的数据时When a user accidentally deletes data in the database

用户删除重要的表或数据库User drops an important table or database

由于应用程序缺陷,用户应用程序意外覆盖了包含错误数据的适当数据。User application accidentally overwrites good data with bad data due to an application defect.

可以通过 Azure 门户在最新的还原点和自定义的还原点之间进行选择。You can choose between a latest restore point and a custom restore point via Azure portal.

最新还原点 :最新的还原点可帮助你将服务器还原到在源服务器上执行的最后一个备份。Latest restore point : The latest restore point helps you to restore the server to the last backup performed on the source server. 用于还原的时间戳还会显示在门户上。The timestamp for restore will also displayed on the portal. 此选项可用于快速将服务器还原到最新状态。This option is useful to quickly restore the server to the most updated state.

自定义还原点 :这将允许你在为此灵活服务器定义的保留期内选择任何时间点。Custom restore point : This will allow you to choose any point-in-time within the retention period defined for this flexible server. 在精确的时间点还原服务器以从用户错误中恢复时,此选项很有用。This option is useful to restore the server at the precise point in time to recover from a user error.

估计的恢复时间取决于多个因素,包括数据库大小、事务日志备份大小、SKU 计算大小和还原时间。The estimated time of recovery depends on several factors including the database sizes, the transaction log backup size, the compute size of the SKU, and the time of the restore as well. 事务日志恢复是还原过程中最耗时的部分。The transaction log recovery is the most time consuming part of the restore process. 如果选择的还原时间接近完整快照备份计划或差异快照备份计划,则还原速度会更快,因为事务日志应用程序很少。If the restore time is chosen closer to the full or differential snapshot backup schedule, the restores are faster since transaction log application is minimal. 为了估计服务器的准确恢复时间,我们强烈建议在环境中对其进行测试,因为它具有太多环境特定的变量。To estimate the accurate recovery time for your server, we highly recommend to test it in your environment as it has too many environment specific variables.

重要

如果要还原配置了区域冗余高可用性的灵活服务器,则会在与主服务器相同的区域和区域中配置还原的服务器,并将其部署为非 HA 模式下的单个灵活服务器。If you are restoring a flexible server configured with zone redundant high availability, the restored server will be configured in the same region and zone as your primary server, and deployed as a single flexible server in a non-HA mode. 请参阅灵活服务器的 区域冗余高可用性 。

重要

已删除的服务器 无法 还原。Deleted servers cannot be restored. 如果删除服务器,则属于该服务器的所有数据库也会被删除且不可恢复。If you delete the server, all databases that belong to the server are also deleted and cannot be recovered. 为了防止服务器资源在部署后遭意外删除或意外更改,管理员可以利用管理锁。To protect server resources, post deployment, from accidental deletion or unexpected changes, administrators can leverage management locks.

执行还原后任务Perform post-restore tasks

从 最新的还原点 或 自定义还原点 恢复机制还原后,你应执行以下任务以使你的用户和应用程序恢复正常运行:After a restore from either latest restore point or custom restore point recovery mechanism, you should perform the following tasks to get your users and applications back up and running:

如果新服务器打算替换原始服务器,请将客户端和客户端应用程序重定向到新服务器。If the new server is meant to replace the original server, redirect clients and client applications to the new server.

确保用户可以连接到适当的服务器级防火墙和虚拟网络规则。Ensure appropriate server-level firewall and virtual network rules are in place for users to connect.

确保设置适当的登录名和数据库级别权限。Ensure appropriate logins and database level permissions are in place.

视情况配置警报。Configure alerts, as appropriate.

后续步骤Next steps

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值