Last Update: Sep 04, 2024 | Published: Nov 03, 2016
This post will show you how to filter out specific files, file types, and sub-folders from a back selection when using the Azure Backup MARS agent to protect files and folders on a Windows PC or server.
The MARS agent is typically being used in a few scenarios:
An administrator or a user might configure a backup selection, but there’s nothing that you can do to prevent users in these liberal environments from dumping their movie or music collection into the backup selection.
The last few versions of Windows Server have included file type filtering to prevent storage of unwanted files, but few are aware that this role feature even exists. It also won’t prevent a situation where the files are allowed but we do not want to back them up.
Another scenario that I encountered was an application that ingested terabytes of temporary files into the data folders; in this case, the temp files were large and scattered throughout the folder structure and existed for hours or days, making it impossible to deselect them.
In both cases, the increased storage impacts costs: the instance charge ($10 for 500GB, RRP) and the amount of blob storage that will be required in Azure to accommodate the backup. We need a means to filter out those files, file types, and folders that are unwanted by the business.
You can control which files, file types, and folders are not backed up:
This is done in a dialog box that you can access by clicking the Exclusion Settings button in the Select Items To Backup screen.
Click Add Exclusion to create a new exclusion rule. A Select Items dialog box appears; using this dialog box I can browse through the folder/file structure of the machine to select items to exclude. I am going to start by excluding a sub-folder called Temp that contains files that I do not need.
I can create another rule for each file type by selecting the folder that contains those files. Then I will edit the File Type entry to create a wildcard for those file types, such as *.MP3 or *.MKV.
This process will reduce the amount of data that is being backed up. This might also be a way that you can use to gradually grow what is being backed up to Azure if you don’t enough bandwidth for an initial backup and the disk transfer method is not an option for you; you can get critical data protected via an initial online backup and then remove rules over time to add more data to the backup set.