Overview of virtual machine and virtual machine backup
A virtual machine (VM) is a virtual environment created by virtualization technology, borrows some of the CPU, memory and storage from a physical machine. It allow users to run an operating system in a single application window as if it were a standalone computer, providing a secure sandbox environment to test programs or access virus-infected data. Therefore it is increasingly gaining popularity among enterprises.
VMs are created and run on a hypervisor. A hypervisor allows one host computer to support multiple guest VMs by virtually sharing its resources. There are mainly 2 types of hypervisors:
- Type 1 hypervisor: also known as bare-metal hypervisor, runs directly on the computing hardware. VMware ESXi and Microsoft Hyper-V are the most commonly used type 1 hypervisor.
- Type 2 hypervisor: also known as hosted hypervisor, runs on top of the operating system of the host machine. VMware Workstation is the most commonly used type 2 hypervisor.
When using VMs for dangerous tests or restoring VMs to physical machines, there may be data loss if a server or physical device fails, shuts down abnormally, or other mis-operations. Therefore, it is essential to perform virtual machine backups before that.
Virtual machine backup is a practical measure for VM data protection. By creating VM backups, you can effectively ensure that important data can be restored in time if it is lost. Implementing a good VM backup strategy can enable faster disaster recovery, and keep business continuity.
Types of virtual machine backups
According to how they work, virtual machine backups can be divided into 2 main types: file-based backup and image-based backup.
Image-based backup: Image-based backups back up the entire VM, including the operating system, configuration files, and all data on disk. Image-based backups are complete and convenient for disaster recovery. Restore from it and you will gain an immediately usable VM.
File-based backup: File-based backups back up a virtual machine as if it were a physical machine by configuring an agent on the guest machine. File-based backup is simple and flexible, and you can choose what to back up yourself. But when restoring you need to create an empty new VM first and then install the agent on the guest machine to restore the data.
For most times, when IT staffs talking about VM backup, they mean image-based backups. But if you only need to back up a small amount of data, you can also choose file-based backups and combine these two backup methods in practice. A good backup strategy is always based on your actual needs.
Other types available for VM backup
Ⅰ. According to the backup method.
- Full backup: A complete backup of the operating system, applications, and all data on the virtual machine.
- Differential backup: Backup up only the data that has changed since the last full backup. Restore requires the full backup which was the differential base, and the last differential backup.
- Incremental backup: Back up only the data that has changed from the last backup. Restore requires the full backup which was the incremental base, and all incremental backups.
Ⅱ. According to the storage of backup files.
- Local backup: Store the VM backup files in the local path of the host.
- Remote backup: Store the VM backup files in the remote server, for example, a network share, or cloud.
Ⅲ. According to the backup frequency.
- Immediate backup: Backup virtual machine once by manual operation.
- Regular backup: Create a backup schedule to perform virtual machine backups periodically.
Virtual machine snapshot vs. backup
Virtual machine snapshots: Virtual machine snapshots (or Hyper-V checkpoints) are records of the state of a virtual machine at a point in time, including all data, memory, devices on the network, network interfaces, and power state of the virtual machine. In the event of a problem, the snapshot can roll back the virtual machine to that point in time. However, it relies on pre-existing physical or virtual machine files to restore data.
VM Backups: VM backups are complete copies of virtual machines, but independent of the VM. They can be easily and securely exported and stored in the cloud, in a separate location, or offsite. They allow you to recreate VMs without relying on source VMs.
VM snapshot vs backup: A VM snapshot can count as part of a backup, but it is not a complete replacement for a backup. To better distinguish them, here I list 3 main differences.
- Data security: A snapshot is a mechanism for recording incremental changes from a point in time, and snapshots depend on the VM's parent disk. If a VM's parent disk is deleted, you will not be able to restore the VM from the snapshot. VM backups are not affected.
- Backup Speed: VM backups are much slower than generating snapshots. And the more data is backed up, the longer the backup takes.
- Space Taken: VM backups can take up a lot of your storage space. Snapshots, on the other hand, take up storage space depending on the number of snapshots and how much data has changed.
Snapshots cannot be a reliable way to protect data from disaster, therefore they are not recommended for use in production environments. They are very convenient for quick testing and troubleshooting. But if there are risks that your VM disks may be deleted or the VM infrastructure may fail, VM backups may be safer.
Besides, in practice, these two ways are often used in combination. Snapshots are used as a short-term, temporary remedy, while backups are used as a long-term, fixed data protection measure.
One quick way to backup multiple VMware ESXi or Hyper-V VMs
Native VM backup ways are more or less deficient, for example, backing up only one VM at a time, cannot automatically executing or deleting old backups to save disk space, etc.
Therefore, many IT staffs turn to a dedicated virtual backup sfotware. Here I recommend you AOMEI Cyber Backup to backup VM easily for the following benefits.
✦ Multiple VMs Backup: with 3 easy steps you can create a complete automatic backup task of multiple, or even all VMs on the host.
✦ Auto Execution: capable of automating backup tasks, and clean old backup files that exceed the specified retention period.
✦ Offsite Restore: capable of restoring backups to new VMs on original or another datastore, host.
✦ Supported versions: VMware ESXi 6.0 and all later versions, Windows Server 2012 and all later versions.
✦ Role Assignment: allows one administrator to create sub-accounts with limited privileges, effectively avoid errors caused by others’ mis-operations.
✦ Affordable Pricing: reasonable charges only base on the number of bound devices, regardless of how many VMs are on the host.
In next section I will demonstrate how to create an automatic ESXi or Hyper-V VM backup task. You can click the following button to start a free trial.
3 easy steps to create automatic backup tasks of multiple VMs
1. Bind Devices: Access to AOMEI Cyber Backup web client, navigate to Source Device > VMware ESXi/Hyper-V > + Add VMware ESXi/Hyper-V to add a host. And then click … > Bind Device.
2. Create Backup Task: Navigate to Backup Task > + Create New Task, and then set up Task Name, Backup Type, Device, Target, Schedule, and Cleanup as needed.
- Device: using AOMEI Cyber Backup you cover multiple, or even all VMs on the host in one task.
- Target: You can select to back up to a local path, or to a network path. Used paths will be saved in Favorite Storage for handy selection.
- Schedule: You can choose to perform full, differential or incremental backup, and automate execution daily, weekly or monthly according to the frequency you specified.
- Cleanup: You can specify a retention period, and the old backup files that exceed the period will be automatically deleted.
3. Start Backup: Click Start Backup and you can select Add the schedule and start backup now, or Add the schedule only.
Created backup tasks will be listed and monitored separately, for progress checking and schedule changing.
3 ways to create image-based backups of VMware Workstation VMs
Basically there are 3 free VM backup ways on image-based level.
Manually Copy VM Disk Files: A VM is essentially a set of files. By manually copying the workstation VM files and storing them additionally, you can restore the VM by opening them directly on workstation. This is probably the most direct way to back up a VM.
Export VM to OVF Template: Open Virtualization Format (OVF) is a file format that supports exchange of virtual appliances across products and platforms. Since OVF files are compressed, you can achieve faster downloads this way.
Clone VMs: Technically, clone is a way to create multiple same VMs. There are 2 kinds of clone, a full clone takes long time to create. But if you create a linked clone, the cloned VM may be unusable if the parent VM fails.
In this section, I will demonstrate how to use these ways to back up VMware Workstation VMs as an example.
Method 1: Manually Copy Virtual Machine Disk Files
1. Launch VMware Workstation, move the cursor to the name of the VM you want to backup. There will be a box showing the folder path where the virtual disk files and configuration files of this system are stored.
2. Come to the folder, and then copy all files or the whole folder to the destination location where you want to store the backup.
Method 2: Export Virtual Machine to OVF Template
1. Launch VMware Workstation, select the target VM, and click File on the toolbar, select Export to OVF…
2. Select a path where you want to save the OVF template file in the pop-up window, and then click Save.
3. Wait for the Export process. The more software you installed in this system, the more time this process will cost.
When it’s accomplished, you will find 3 files in destination location. The manifest file ends with .mf, the OVF file which provides a complete specification of the virtual machine, and the virtual disk file ends with .vmdk.
Tip: You can also backup VMware Workstation VM by manually copy disk files or clone.
Method 3: Clone Your Virtual Machine
1. Launch VMware Workstation, select the VM you want to clone. Then click VM button on toolbar, and select Manage > Clone… to open Clone Virtual Machine Wizard. Click Next in the pop-up window.
2. Designate Clone Source. You can select to Clone from the current state in the virtual machine, or from an existing snapshot (powered off only).
If you select the upper one, workstation will create a snapshot before cloning it.
If you don’t have a usable snapshot, the second choice will be unselectable.
3. Designate Clone Type. You can create a linked clone, or create a full clone.
4. Provide the name and storage path of your clone. Then click Finish.
Virtual machine backup is one of the most basic measures to ensure VM data security. In this article, I briefly introduced what is virtual machine backup, what backup types available, and how to create image-based backups for VMware and Hyper-V VMs. Besides, as another failsafe measure, please note that VMware snapshots cannot be used as backups, or you may result in data loss.