Brian Jackson - Fotolia
Back up VMware environments with these best practices and tips
When you back up a VMware environment, use best practices to guide you, and weigh pros and cons of different methods. You can also automate backups and use third-party tools.
Even in a virtualized environment, backup plays a key role in workload protection and sound data center operations. With the right tips and tools, you can efficiently back up VMware environments for simple restoration.
You can ensure useful, quality backups that can help you in the event of an outage, a malicious attack or a natural disaster with a mix of select best practices, tips and tools. Such practices include avoiding the use of snapshots as backups and automating the backup process.
You can also use VMware native tools such as VMware Consolidated Backup and third-party tools such as Veeam Availability Suite to ease the burden of backups.
VMware backup best practices
You can maximize backup efficiency with a handful of strategies. First, ensure you don't back up VMware VMs at the guest OS layer. Instead, back up your data at the virtualization layer. This eliminates resource consumption so your VMs still have all the resources they require to run their workloads.
Also, don't use snapshots as backups. Snapshots work for making short-term copies of VMs but take up significant disk space on your VM's disk file and your data stores. When you run out of data store space, your VMs shut down. Merging snapshot data back onto the original disk can also affect VM performance, because the merging process is a heavy I/O task.
Finally, be aware of backup alternatives, especially for VMs that use the Fault Tolerance feature, which doesn't support snapshots and can be difficult to back up. You can create a copy of a VM by cloning it using vCenter Server or vCenter Converter, back up that copy and then delete the copy. You can also use an agent installed in the OS to back up a VM.
Additional best practices include using incremental backup technologies such as Changed Block Tracking, quiescing vital transactional applications such as email servers and databases, and testing restoration regularly to ensure it works as intended. Ensure you have a secure and protected place to store your backups; keeping physical, offline backups is often a great way to ensure your backups remain uncompromised.
Traditional vs. new backup strategies
The traditional method for backing up VMs involves backing them up just as you would a physical machine. Normally, all you require for this method is a backup agent installed in your desired VM, which then can move files and data to available backup servers. This creates one consistent backup approach across a data center, and you can use the same software to quiesce applications. However, this method places a significant load on the system and network, and the backup software must be able to identify and work with VMs as well as physical machines.
A more recent strategy is to save workloads as VM files. This method is quick, simple and takes full advantage of an environment's virtualization capabilities. VM file backups use shared storage, and you can easily back these files up without placing an additional load on your system. The drawback to this method is that you can't just save part of a VM; you must save the whole thing. As a result, the restoration process can be lengthy, because the system must process more data to recover.
Automate backups with vCSA
You can automate backup and recovery through the vCenter Server Appliance (vCSA) to save yourself time and avoid manual backups. To automate backup, save the backup script into a text editor and save the file as "backup.sh" with script details filled in:
Next, copy the script to your vCenter host and use a command in the directory to make the script executable:
chmod +x /usr/backup.sh
You can then run the script with a final command:
You can also run an automated backup as a separate user, which presents a much smaller security risk than backing up as the root, and schedule backups to run periodically. To run a backup as a separate user, log out of the Secure Shell client and reconnect using the following command:
localaccounts.user.add --role operator --username backupuser –password
Even with the help of automated backups, ensure you test your restoration process regularly.
Take advantage of backup tools
There are a number of tools -- both VMware and third-party -- that can assist you in backup and recovery tasks.
VMware offers several native tools, such as VMware Consolidated Backup, which protects VMs by offloading the backup workload to a backup proxy server, and vSphere Replication, which automates the failover of virtual servers to a recovery site. VMware vCSA contains native backup capabilities, and you can use VMware disaster recovery products such as Site Recovery Manager to automate failover and DR testing to speed up DR time.
You can also use third-party tools, such as Veeam Availability Suite, which provides VM backup and image-based VM replication, and Acronis Backup, which offers a backup and recovery platform for ESX hosts, VMs or clusters across an entire virtualized environment.