VMware is one of the most popular choices when it comes to virtualization solutions at the enterprise level. However, using the most well-known option on the market doesn’t mean that you should forget about other important things, namely – data protection and VMware machine backups. You should always have a plan in case something goes wrong with your system or data inside the virtual machine. Accordingly, there are several recommended best practices when it comes to managing VMware backups.
An effective VMware backup is all about:
- Keeping several copies of your VM data;
- Storing your VMware backups in multiple locations;
- Providing complete copies of your systems, down to every last document;
- Being independent and not relying on any single part of your internal infrastructure;
- Having the ability to backup applications inside VM as well, such as databases, ERP, CRM ‘s, etc.
There are also some other, less obvious features, that you should keep in mind when it comes to a proper VMware backup, like data replication, data encryption, automated recovery, automated data verification, data protection on both physical and virtual level and so on.
Snapshots for VMware backup operations
One of the most common methods for VMware data protection are VM snapshots. Although snapshots are actually quite innovative as a technology and allow an easy rollback to a specific point in time with little downtime, there are many instances where it is being used incorrectly.
The problem with snapshot as a main backup type is that in breaches one of the main principles of an effective backup that we’ve discussed earlier – a backup shouldn’t rely on any specific part of your infrastructure. And snapshots rely heavily on the underlying virtual disk’s structure working properly.
Creating a snapshot means that you’re creating a new delta disk and writing on it everything that happened right up to the point that specific snapshot was taken – making the snapshot itself potentially completely unusable without the virtual disk’s structure to support it. It is useful for specific cases though, like indev or testing environments, to allow rollbacks after some changes have been implemented within a specific VM.
Free VMware backup software
It may also be productive to showcase the process of creating a VMware backup using an example of sorts, but before we move on to that – there is also the topic of third-party VMware backup solutions. There are quite a lot of these solutions that are currently available on the market, and the list below is by no means complete – but it does act as a showcase of how vast and varied the VMware backup market is at this point.
Veeam as a company was one of the first backup software providers to offer less than 15 minutes of RTPOs for companies that can be qualified as Always-On Enterprise, relying a lot on 24/7 availability for their products and services. Ever since then, Veeam Backup has been one of the more notable solutions on the market, offering a wealth of features to different client groups, including virtualization. Veeam also has free versions of its solutions for smaller companies and potential clients – such as Veeam Backup Free Edition. It covers both Hyper-V and VMware vSphere and is limited to 10 workloads at once – but there are plenty of features to work with, such as VM cloning and exporting, easy configuration, instant File-Level recovery, Direct Restore support, and many others.
Storware is a software company that has offices in Europe and the USA, offering business software for multiple use cases. Storware Backup and Recovery (previously called Vprotect) is a tool for snapshot management and backup tasks for virtual machines, offering automation capabilities for any app type that supports it. There are quite a lot of different apps and platforms that it can work with, including VMware, RHV, Hyper-V, OpenStack, KVM, and even Amazon EC2. The same goes for object storage and backup destinations and works with databases, app data, configuration files, as well as regular data. Storware has a dedicated free version of its backup software that has most of the features mentioned above, but it is limited to 10 environments at once (VMs or containers), 10 apps, 100 M365 users, and 1 TB of data transfer for backups moving towards Storage Providers.
Vinchin may not be the most popular solution on the market, but it still has its own client base of thousands of customers all over the planet. Vinchin Backup & Recovery supports a number of virtual platforms – Hyper-V, VMware, and others. It offers a user-friendly backup service, as well as a comprehensive disaster recovery service with an outstanding performance across the board. Vinchin’s backups are agentless and incremental, capable of being performed either daily, monthly, or weekly, and the solution itself supports a multitude of backup repositories – Partition, Local Disk, NFS, CIFS, etc. The Free Edition of Vinchin Backup has all of its capabilities but it is only limited to 3 virtual machines at once, making it a great pick for micro-businesses with the ability to upgrade to a paid version when the business grows bigger than what Vinchin can support for free.
VSquare is a comprehensive backup solution capable of covering both virtual and physical environments. Both backup and disaster recovery tasks are scalable and secure with VSquare, allowing for host-to-host recovery, remote site recovery for redundancy, as well as backup checking on a regular basis to ensure their working state. The list of features also includes File Level restore, storage deduplication support, AD permissions, and does not have any per-machine or per-socket fees. VSquare also has a free version of its solution that is called the Startup version, it covers no more than 3 VMware installments, 3 Hyper-V virtual machines, up to 2 backup threads, and a single backup schedule.
Altaro is a relatively new competitor in the backup market that has been showing impressive growth rates for a while now, offering a user-friendly backup solution with a focus on middle-sized and smaller companies. Altaro VM Backup offers manageable backup schedule customization, can back up running VMware VMs, can perform hot backups for Hyper-V, supports Linux VMs, can create and restore cloned VMs, and also supports SQL/Exchange Server VM backup via VSS Writer. Altaro VM Backup’s Free Edition supports up to 2 VMs for one host for free, with the ability to update to a premium version at any point in time.
Thinware vBackup is a relatively unknown backup and recovery solution built specifically for virtual infrastructure to achieve efficiency and ease of use at the same time. Thinwire can be used to reduce system downtime, reduce backup costs via backup automatization, improve the performance of these backups via off-host processing, and more. It is considered one of the cheapest backup solutions on the market, and it is also one of the few backup solutions on the market that does not have a limitation on how many VMs can be backed up with a free version. There are still limitations in place, such as the lack of any data compression, the lack of most integrations with VMware API, and many others.
Another notable player on the general enterprise backup market, NAKIVO is a well-known data security solution that focuses on cloud environments and virtualization first and foremost. NAKIVO can perform both backup and disaster recovery operations as-a-service, while also having outstanding backup performance, fast recovery time, better reliability, and more. It is easy to deploy, easy to control, and there are even several different ways to transfer backups, be it LAN, WAN, or even to cloud storage such as Azure or AWS, ensuring backup safety in any situation. NAKIVO offers a Free Edition of its backup solution (Pro tier) that lasts one year and can cover 10 or fewer workloads, 10 VMs, and 5 M365 users – a great way for anyone to try all of the features of NAKIVO for free.
A company called 33HOPS is the creator of XSI Backup – an open-source backup solution for VMware ESXi environments (from 5.1 to 6.7) that runs directly in the host of the hypervisor, meaning it does not need a client installed on every virtual machine. Hot backups are its main backup type, and it also supports differential backups, data deduplication, quiescing, and more. XSI is completely free for everyone and there are no additional charges attached to the software, but it can be somewhat challenging to work with due to a higher-than-normal knowledge requirement for proper backup management via the command line and/or Cron.
Vembu’s Backup, Disaster Recovery Suite (BDR Suite) is one of the most well-known backup solutions on the market, suitable for many different use cases and situations. BDR Suite can cover Windows, Mac and Linux installments, as well as Hyper-V and VMware VMs, and many others. It offers flexible deployment options and can be customized for many different use cases out there, from regular IT department setups to comprehensive data security environments in enterprise-level companies. Vembu also has a free version of its own BDR Suite, which offers virtual and physical backups with multiple recovery options and secure data transmission without any payments at all. However, BDR Suite Free Edition does have a limitation of 10 VMs, 10 workstations, 10 M365/Gmail users, and 10 endpoints.
ghettoVCB.sh is most likely the most complicated solution on this list – as a set of highly customizable scripts that offer VMware ESXi server backups for free. This script can create snapshots of active VMs while also creating VMDK (virtual machine disk) backups – these snapshots are also deleted whenever the next backup is completed, making sure there is no excessive storage usage. It is compatible with several different ESXi versions starting from 3.5 and up to 7.x. It also uses host server resources because there is no support for VCB Proxy service, and backup scheduling can be performed using a front end called MKSBackup. However, ghettoVCB.sh is also somewhat complicated when it comes to initial setup, and controlling it properly requires a decent level of VMware knowledge combined with Linux command line knowledge.
Practical backup example with Bacula
Now that you see that there are quite a lot of different VMware backup solutions on the market, it should be easier to understand that there is a significant demand for this kind of protection. As such, we can also present another free solution – Bacula Community, or also just known as Bacula. It is a free and open-source backup solution for many different and unlimited target locations, including VMware.
By the way, it is important to remember that snapshots are usually treated as a short-term means of backing up, since longer periods can lead to a plethora of problems, such as corruption, performance degradation and so on.
Another option is to use Bacula in tandem with GhettoVCB to back up VMware virtual machines.
The first step of doing that is to turn on the SSH service on ESXi. You can do that using the vSphere client in the configuration tab.
Your next step is the “Security Profile” line, you’ll be able to find and click the “Properties…” link there.
This tab allows you to see all of the “Remote Access” services. Choose SSH and click the “Options” button.
It will open a new window, allowing you several different start/stop options for your VMware ESXi host.
That concludes the process to allow using SSH to access your VMware vSphere. If you have connection problems after that – look at your ESXi server firewall, as shown below.
After that whole process we can begin configuring Ghetto VCB. But first, we need to download it (from https://github.com/lamw/ghettoVCB), we’re looking for a file called master.zip.
Next we’ll have to copy this file – package – to the ESXi server’s root folder (an example of the proper command is this):
scp master.zip email@example.com://
And then we can unzip it via SSH (example below):
Using the same command line we’re accessing the script folder we’ve just created by unpacking the archive:
Script configuration comes next in this process:
An example of the config file’s contents is below. Two lines we’re looking for are: VM_BACKUP_VOLUME part – specifies the target location of an intermediate backup, and VM_BACKUP_ROTATION_COUNT – the number of local backups to be stored.
That same config file allows you to set up backup transfer via NFS (Network file system) or using an e-mail.
You’ll have to give the Ghetto script “execute” permissions, too, if you want everything to actually ‘happen’!:
chmod o+rx ghettoVCB.sh
The last step of this setup process is to perform a test script run. Specifying the exact VM that would be backed up is possible either via -a command (this tells the script to back up all of the VMs) or by specifying the VM’s name:
ghettoVCB.sh -g /ghettoVCB-master/ghettoVCB.conf -m VM-NAME
There’s also some means of automating this process that can be done via Bacula. For example, you can tell the system to run this script after a specific amount of time has passed, or you can set it up to perform before Bacula itself performs the backup.
Since you can’t install Bacula’s client on an ESXi, there’s a way to call the specific script from another server and then copy the backup that was generated. You can even set up another backup script that would delete the Ghetto script file after Bacula is done copying the storage of your choosing.
To remotely call the script you’ll have to install sshpass. Here’s how to do it:
apt-get install sshpass
There’s a command that can be used to configure and set up for a backup job to launch the script at a specific point in time:
Name = "Backup_Esxi_VM-NAME"
JobDefs = "DefaultJob"
Client = srv-backup-fd
FileSet = VM-NAME
ClientRunBeforeJob = "sshpass -p 'xxxx' ssh -o StrictHostKeyChecking=no firstname.lastname@example.org /ghettoVCB-master/ghettoVCB.sh -g /ghettoVCB-master/ghettoVCB.conf -m VM-NAME"
ClientRunAfterJob = "sshpass -p 'xxxx' ssh -o StrictHostKeyChecking=no email@example.com rm -rf /vmfs/volumes/datastore1/backup/VM-NAME"
Schedule = vms-schedule
Priority = 10
To copy the Ghetto backup script to an another server you can use the same command we used to copy Ghetto’s archive file to an ESXi server – scp command – or you can use Bacula’s bpipe plugin that has the advantage of not occupying additional space on the target server by going straight to data backup. Since we’ve shown how scp command works already, here’s an example with the bpipe script:
Name = "VM-NAME"
signature = MD5
Compression = GZIP1
Plugin = "bpipe:/mnt/bkp_VM-NAME.tar:sshpass -p 'xxxx'
ssh -o StrictHostKeyChecking=no firstname.lastname@example.org /bin/tar -c /vmfs/volumes/datastore1/backup/VM-NAME:/bin/tar -C /backup/bacula-restores -xvf -"
This command sequence allows Bacula to restore the backup on the same machine that has the client installed (/backup/bacula-restores). The restoration process is somewhat similar, you’ll have to use Ghetto’s restore script (ghettoVCB-restore.sh) and copy the backup files to the ESXi server for the purpose of importing everything back to vSphere.
Bacula Community as a reliable VMware backup solution
Your VMware backup needs can be better met with Bacula Community – the main principle behind it being the installation of a Bacula File Daemon on each VM (virtual machine) in the system, in the same way you would do as if they were actual physical servers. To prevent overloading your system and optimize the I/O usage when it comes to your VMware ESX(ESXi) servers, you can use Priority, Schedule and Maximum Concurrent Jobs – this should prevent the system from running all of the backups at the same time. You might run into a situation when your network/disk subsystem would overload – creating a bottleneck of sorts.
By treating your VMs like physical servers and installing bacula-fd on each of them you’ll benefit from a number of especially useful features, such as job verification, individual file restoration, file level compression for your data, and so on.
If you're also interested in Windows Backup, check out Bacula's solution.