HyperBac can be used to accelerate and optimize this process by compressing one or both of the primary backup file and/or the remote offsite mirrored backup file.
Furthermore using HyperBac, compression and/or encryption can be achieved seamlessly using native SQL Server commands and procedures.
Some simple examples are provided below with code, assuming HyperBac is installed on the server performing the backup operation and the HyperBac Control Service is running, note that HyperBac does not need to be installed on the mirrored backup location.
First a native example without compression to be used as a baseline:
Figure 1 – Conventional backup operation mirrored to a remote path without compression
As seen in this example, the remote UNC mirror path introduces a substantial bottleneck and adversely affects the throughput and elapsed time for the backup operation.
Figure 2 – Local backup directory
Figure 3 – Remote (Mirror) backup directory
Now we will introduce compression to the remote mirror destination using HyperBac, the code to be used is as follows:
/* Uncompressed Primary Backup File and COMPRESSED Mirrored Backup File /*
BACKUP DATABASE AdventureWorks
TO DISK = 'C:\MSSQL\Backup\AdventureWorks_Uncompressed_FullBackup.bak' MIRROR TO
DISK = '\\192.168.0.3\C$\MSSQL\Backup2\AdventureWorks_Compressed_MirroredBackup.hbc'
WITH FORMATFigure 4 – Backup operation (not compressed locally) mirrored to a remote path with compression
As seen above by compressing the remote mirror destination using HyperBac the backup operation runs twice as fast as the equivalent uncompressed operation. The output files in the remote mirrored backup location are shown below:
Figure 5– Remote backup directory
As visible from the above, the compressed backup file is approximately 25% of the uncompressed backup file. Double clicking the file 'AdventureWorks_Compressed_MirroredBackup.hbc' brings up the file properties using the HyperBac WinExtractor with the details below:
Figure 6 – File properties for the HyperBac compressed backup file
To speed up the operation even further, compress both the local and remote backup file on the fly using HyperBac. The code used is as follows:
/* COMPRESSED Primary Backup File and COMPRESSED Mirrored Backup File /*
BACKUP DATABASE AdventureWorks
TO DISK = 'C:\MSSQL\Backup\AdventureWorks_Uncompressed_FullBackup.hbc' MIRROR TO
DISK = '\\192.168.0.3\C$\MSSQL\Backup2\AdventureWorks_Compressed_MirroredBackup.hbc'
WITH FORMATFigure 7 – Backup operation mirrored to a remote path with compression locally and on the remote destination
We can now see the files are compressed in both the local backup directory and the remote path.
Figure 8 – Local backup directory after HyperBac compressed backup operation
Figure 9 – Remote backup directory after HyperBac compressed backup operation
Similarly, HyperBac can produce a ZIP compatible output file, enabling decompression using WinZip, WinRar, PKZip and others as well as being able to restore the compressed file directly with native RESTORE commands using HyperBac. The code used to produce ZIP compatible compressed backup files on the local and remote location is as follows:
/* COMPRESSED Primary Backup File and COMPRESSED Mirrored Backup File (ZIP Compatible) /*
BACKUP DATABASE AdventureWorks
TO DISK = 'C:\MSSQL\Backup\AdventureWorks_Uncompressed_FullBackup.zip' MIRROR TO
DISK = '\\192.168.0.3\C$\MSSQL\Backup2\AdventureWorks_Compressed_MirroredBackup.zip'
WITH FORMATFigure 10 – Compressed mirrored backup operation to ZIP compatible output files
For more information visit SQL Server Backup Compression using HyperBac











