{"meta":{"title":"生成快照","intro":"若要在升级之前保存 GitHub Enterprise Server 数据，请创建虚拟机快照。","product":"企业管理员","breadcrumbs":[{"href":"/zh/enterprise-server@3.22/admin","title":"企业管理员"},{"href":"/zh/enterprise-server@3.22/admin/upgrading-your-instance","title":"升级你的实例"},{"href":"/zh/enterprise-server@3.22/admin/upgrading-your-instance/preparing-to-upgrade","title":"准备升级"},{"href":"/zh/enterprise-server@3.22/admin/upgrading-your-instance/preparing-to-upgrade/taking-a-snapshot","title":"获取快照"}],"documentType":"article"},"body":"# 生成快照\n\n若要在升级之前保存 GitHub Enterprise Server 数据，请创建虚拟机快照。\n\n## 关于快照\n\n快照存储虚拟机 (VM) 在某一时间点的状态。 GitHub 强烈建议在升级 VM 之前创建虚拟机监控程序级别快照，以便在升级失败时可以将 VM 恢复到快照。\n\n## 快照类型\n\n有两种类型的快照：\n\n* VM 快照会保存整个 VM 状态，包括用户数据和配置数据。 此快照方法需要占用大量磁盘空间，且比较耗时。\n* 数据磁盘快照仅保存用户数据。\n\n## 创建快照\n\nGitHub 建议仅在实例的 VM 处于关闭状态或实例处于维护模式且所有后台作业都已完成时创建 VM 快照。\n\n可创建的快照类型取决于所使用的平台。\n\n* 某些平台不允许你只生成数据磁盘的快照。 对于此类平台，你需要生成整个 VM 的快照。\n* 如果你的虚拟机监控程序不支持完整的 VM 快照，你应连续、快速地生成根磁盘和数据磁盘的快照。\n\n| 平台 | Snapshot 方法 | 文档 |\n|---|---|---|\n| Amazon AWS | Disk |               在 AWS 文档中[创建 Amazon EBS 快照](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html)\n| Azure | VM | Microsoft Learn 中的[在 Azure VM 上创建虚拟硬盘的快照](https://learn.microsoft.com/azure/virtual-machines/snapshot-copy-managed-disk)\n| Hyper-V | VM | Microsoft Learn 中的[在 Hyper-V 中启用或禁用检查点](https://docs.microsoft.com/windows-server/virtualization/hyper-v/manage/enable-or-disable-checkpoints-in-hyper-v)\n| Google Compute Engine | Disk | Google Cloud 文档中的 [Create and manage disk snapshots](https://cloud.google.com/compute/docs/disks/create-snapshots)（创建和管理磁盘快照）\n| VMware | VM | VMware Docs 中的 [Taking Snapshots of a Virtual Machine](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.hostclient.doc/GUID-64B866EF-7636-401C-A8FF-2B4584D9CA72.html)（拍摄虚拟机的快照）"}