{"meta":{"title":"Taking a snapshot","intro":"To save your GitHub Enterprise Server data before upgrading, take a VM or disk snapshot.","product":"Enterprise administrators","breadcrumbs":[{"href":"/en/enterprise-server@3.20/admin","title":"Enterprise administrators"},{"href":"/en/enterprise-server@3.20/admin/upgrading-your-instance","title":"Upgrade your instance"},{"href":"/en/enterprise-server@3.20/admin/upgrading-your-instance/preparing-to-upgrade","title":"Prepare to upgrade"},{"href":"/en/enterprise-server@3.20/admin/upgrading-your-instance/preparing-to-upgrade/taking-a-snapshot","title":"Take a snapshot"}],"documentType":"article"},"body":"# Taking a snapshot\n\nTo save your GitHub Enterprise Server data before upgrading, take a VM or disk snapshot.\n\n## About snapshots\n\nA snapshot stores the state of a virtual machine (VM) at a point in time. GitHub highly recommends taking a VM or disk snapshot before upgrading your VM so that if an upgrade fails, you can restore your instance from the snapshot.\n\n## Types of snapshots\n\nThere are two types of snapshots:\n\n* **VM snapshots** save your entire VM state, including user data and configuration data. This snapshot method requires a large amount of disk space and is time consuming.\n* **Data disk snapshots** only save your user data.\n\n## Creating a snapshot\n\nGitHub only recommends taking a VM snapshot when the instance's VM is powered down, or when the instance is in maintenance mode and all background jobs have finished.\n\nThe type of snapshot you can take depends on the platform you use.\n\n* Some platforms don't allow you to take a snapshot of just your data disk. For these platforms, you'll need to take a snapshot of the entire VM.\n* If your hypervisor does not support full VM snapshots, you should take a snapshot of the root disk and data disk in quick succession.\n\n| Platform              | Snapshot method | Documentation                                                                                                                                                                          |\n| --------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Amazon AWS            | Disk            | [Create Amazon EBS snapshots](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-snapshot.html) in the AWS documentation                                                 |\n| Azure                 | VM              | [Create a snapshot of a virtual hard disk on an Azure VM](https://learn.microsoft.com/azure/virtual-machines/snapshot-copy-managed-disk) in Microsoft Learn                            |\n| Hyper-V               | VM              | [Enable or disable checkpoints in Hyper-V](https://docs.microsoft.com/windows-server/virtualization/hyper-v/manage/enable-or-disable-checkpoints-in-hyper-v) in Microsoft Learn        |\n| Google Compute Engine | Disk            | [Create and manage disk snapshots](https://cloud.google.com/compute/docs/disks/create-snapshots) in the Google Cloud documentation                                                     |\n| VMware                | VM              | [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) in VMware Docs |\n\n## Restoring from a snapshot\n\nIf an upgrade fails, you can restore your instance from the snapshot you took before upgrading.\n\n* If you took a VM snapshot, revert the VM to the snapshot.\n* If you took disk snapshots, deploy a new instance running the same release as the snapshots, then attach volumes created from those snapshots. See [Installing GitHub Enterprise](/en/enterprise-server@3.20/admin/installing-your-enterprise-server)."}