I have a Synology NAS at home which is used for both my home lab and general NAS purposes (file shares, Plex, etc). I recently setup the ‘Active Backup For Business’ (ABfB) package on my Synology as I wanted to try out the backup function for my VMware lab.
Excitingly for me the ABfB package supports deduplication for backup data. This is vital as I only have a two bay NAS running everything and my space is getting low. In the future I’ll be replacing this NAS with a larger bay model to expand my available storage and performance. Deduplication is typically handled as either an inline or post process fashion – what this means is either we dedupe data is it streams to the NAS or we stream the data in it’s raw full format and then later a scheduled task looks through those blocks to see which can be discarded.
Synology have chosen to go down the route of inline deduplication which is great, only unique blocks will be saved to my NAS. Additional information can be found at the following link –
Taken from the above link we have confirmation of the dedupe process –
Active Backup for Business provides built-in deduplication technology to greatly enhance data storage efficiency. In addition, full synthetic data storage, which leverages the Btrfs file system, also helps reduce storage usage.
There are different deduplication mechanisms in the market. To ensure maximum storage and resource efficiency, Synology Active Backup for Business uses target inline deduplication with hash-based duplicate detection. Inline deduplication scans the data and deletes the duplicated blocks before it is written to a backup repository. Since this technique clears repetion backup data, it helps to reduce the requirement of storage in a respository. To identify identical blocks, this technique uses cryptographic algorithms such as SHA-256 to calculate a hash for each block, which is the divided fixed length backup data. The blocks with same hashes are considered to be identical and therefore deleted.https://www.synology.com/en-uk/knowledgebase/DSM/help/ActiveBackup/activebackup_business_virtualmachine_backup_overview_reduction
If you want to check the requirements for ABfB – https://www.synology.com/en-uk/knowledgebase/DSM/help/ActiveBackup/activebackup_business_requireandlimit
I will provide a brief walk through of setting up ABfB to connect to VMware vCenter and running backups.
First off you need to ensure ABfB is installed via Synology Package Center, in my case I have already installed it –
Please note you may need to go through a setup process to fully enable and configure ABfB. I am not going to cover that process in this post.
Now that we have the package installed we can move on to integrating with our VMware vCenter environment. If we open the package we are presented with a home page displaying various information widgets.
We need to select the Virtual Machine tab and then click the button to ‘Manage VMware vSphere’ –
A new window will open which we can use to configure out NAS -> vCenter connectivity.
We click the ‘Add’ button and then populate the requested fields. In my case I am using the IP address of my vCenter – the reason for this is that my DNS setup at home is being reconfigured and I haven’t setup all my lab records yet. I also chose to use the default root account for my environment – I will probably edit this later to be a dedicated service account but for our purposes this will work OK. If you were setting this up in a business environment I would strongly recommend using a dedicated service account.
Assuming your connection works you should be presented with confirmation that the Synology is able to communicate and that the vCenter is seen as ‘Online’ –
Excellent – we now have connectivity between the NAS and the VMware platform. We should now see the contents of the vCenter environment displayed. Each host and the virtual machines located on it are listed. Basic information is displayed with further details available if you click on the arrow to the right of the VM object.
Now that we have visibility of our virtual machines we can start to create backup tasks to protect them. To do this we use the ‘Create Task’ button and complete the wizard.
The first step is to select a location to store our backup data. In my example I am using the default location for my ABfB package.
Next we will create a name for our task, in my example I am backing up the two Active Directory domain controllers. I have selected both domain controller virtual machine objects.
Now we can select how many concurrent backup devices we want along with a number of other settings. I would recommend you leverage VMware Changed Block Tracking or CBT as it is often known. This will ensure that only blocks of data which have changed since the last backup are protected. This can have a considerable improvement on backup transfer times as we are only sending changed data as opposed to every block of the VM.
We can also select the ‘application-aware backup’ box which will leverage VMware tools and Microsoft Volume Shadow Copy Service (VSS).
I have also selected to compress the data transferred over my network. My current Synology NAS is only connected via two 1Gbps Ethernet links in an LACP. In the future I hope to replace this NAS with a 10Gbps version which will allow me to stream data much faster.
For those of you with a Synology powerful enough to run Virtual Machine Manager (another Synology package) you can get ABfB to restore the backup of your virtual machine into Virtual Machine Manager and record a video to provide evidence the VM backup restores and runs correctly. This is a really cool feature and I wish I had a Synology which supports this to blog and demo.
There are ‘Advanced Settings’ which can also be configured on each VM. This allows you to script against these VMs should you so wish.
The next step is to define a backup schedule – this is determined by your recovery point objective or RPO. In my example I am going to protect these virtual machines on a weekly basic on Saturday at 05:00.
Now we can determine our backup retention – again it’s up to you to decide how many backups you want to keep.
The next part of the wizard allows us to decide which of the Synology users will have backup privileges.
Finally we are presented with a summary page allowing us to confirm our settings before we complete the wizard. On clicking ‘Apply’ the wizard will prompt asking whether we want to run this backup task now. I’m going to create some additional tasks so I said no.
Once our tasks are created we can test running a backup. We can view performance data for the transfer and also view a log of the task.
Here we have a log example from protecting my vCenter virtual machine.
We can also check on the deduplication rate of our backups on the Overview tab or on the ‘Storage’ tab. The Overview tab only provides the size after deduplication and not the ratio which is shown in the Storage tab. Currently in my example the ratio is 1.68 which isn’t very high however I’ve only protected 3 virtual machines. As I protect more virtual machines, especially those with common data (e.g multiple Microsoft Windows VMs) the ratio should increase allowing me to realise even greater savings.
If you were viewing vCenter during these tasks you would see a task launch to snapshot the virtual machine and then subsequently remove the snapshot when the task is completed.
Finally the important part of any backup strategy is restoring systems and files. ABfB allows us to do both, restoring virtual machines in a number of ways while also providing an interface for item level restore. As you can see below we have 3 options for restoring a virtual machine. ‘Instant Restore’ mounts the VM and connects it to vCenter while ‘Full VM’ restore does a complete copy back to the actual VMware environment. Both from what I understand leverage NFS to handle the mounting or copying of data.
The third option is unavailable on my Synology NAS but if you have one which supports Virtual Machine Manager you can restore the backup to VMM running on your NAS. This is really cool and I’d love to have a unit which could do this – not only can one confirm backups work as we found out above but we can also restore direct to the NAS should we need to.
As you can see, when restoring back we have the option of overwriting the original VM or restoring to a new location with different settings. This can be useful when you want to replicate a VM entirely for testing or some other purpose. Of course you could just clone the VM in vCenter but sometimes you need to replicate a previous version of the virtual machine so this feature is welcome.
Being able to do item level restore, that is where we extract individual items from a virtual machine backup image is great. We can both restore an individual item to the VM or we can choose to download that file to an alternate system such as our own PC.
I’m really excited to have a backup solution running directly on my NAS which protects my VMware lab. I didn’t have to create a virtual appliance in vCenter or consume any host compute/storage resource on vSAN. I also benefit from inline deduplication to help save on NAS storage space. Perhaps in the future if I’m lucky enough to get a bigger NAS I can also test the restoration into Virtual Machine Manager to prove that the backups are good. Always remember that an untested backup provides no guarantees. You should regularly test restoring systems/files/databases etc to confirm not only that the data is good but that the restoration process works and you understand it.