在 Azure 中从快照还原应用Restore an app in Azure from a snapshot

本文介绍如何在 Azure 应用服务中从快照还原应用。This article shows you how to restore an app in Azure App Service from a snapshot. 可以根据应用的某个快照将应用还原到以前的状态。You can restore your app to a previous state, based on one of your app's snapshots. 不需启用快照备份,平台会自动保存所有应用的快照,用于数据恢复。You do not need to enable snapshots backup, the platform automatically saves a snapshot of all apps for data recovery purposes.

快照为增量影子副本,与常规备份相比有多项优势:Snapshots are incremental shadow copies, and they offer several advantages over regular backups:

  • 不会因文件锁定而造成文件复制错误。No file copy errors due to file locks.
  • 没有存储大小限制。No storage size limitation.
  • 不需配置。No configuration required.

从快照还原适用于在高级层或更高层中运行的应用。Restoring from snapshots is available to apps running in Premium tier or higher. 有关向上缩放应用的信息,请参阅在 Azure 中向上缩放应用For information about scaling up your app, see Scale up an app in Azure.

限制Limitations

  • 此功能目前为预览版。The feature is currently in preview.
  • 只能还原到同一应用或属于该应用的槽。You can only restore to the same app or to a slot belonging to that app.
  • 用于服务在执行还原操作时会停止目标应用或目标槽。App Service stops the target app or target slot while doing the restore.
  • 应用服务保留三个月的快照,用于平台数据恢复。App Service keeps three months worth of snapshots for platform data recovery purposes.
  • 只能还原过去 30 天的快照。You can only restore snapshots for the last 30 days.
  • 在应用服务环境上运行的应用服务不支持快照。App Services running on an App Service Environment do not support snapshots.

从快照还原应用Restore an app from a snapshot

  1. Azure 门户中应用的“设置”页上,单击“备份”以显示“备份”页 。On the Settings page of your app in the Azure portal, click Backups to display the Backups page. 然后,在“快照(预览)”部分下单击“还原”。 Then click Restore under the Snapshot(Preview) section.

    显示如何从快照备份还原应用的屏幕截图。

  2. 在“还原”页中选择要还原的快照。****In the Restore page, select the snapshot to restore.

    显示如何选择要还原的快照的屏幕截图。Screenshot that shows how to select the snapshot to restore.

  3. 在“还原目标”中指定应用还原的目标。****Specify the destination for the app restore in Restore destination.

    显示如何指定还原目标的屏幕截图。

    警告

    如果选择“覆盖”****,则会清除并覆盖应用的当前文件系统中的所有现有数据。If you choose Overwrite, all existing data in your app's current file system is erased and overwritten. 在单击“确定”**** 之前,请确保该操作是想要执行的操作。Before you click OK, make sure that it is what you want to do.

    备注

    由于目前的技术限制,只能还原到同一缩放单元的应用。Due to current technical limitations, you can only restore to apps in the same scale unit. 将来的版本会取消此限制。This limitation will be removed in a future release.

    可以选择要还原到槽的现有应用You can select Existing App to restore to a slot. 在使用此选项之前,应该已在应用中创建一个槽。Before you use this option, you should have already created a slot in your app.

  4. 可以选择还原站点配置。You can choose to restore your site configuration.

    显示如何还原站点配置的屏幕截图。

  5. 单击“确定”。Click OK.