- Veeam Support Knowledge Base
- NAS Recycle Bin impact on Veeam Backup & Replication Repositories
NAS Recycle Bin impact on Veeam Backup & Replication Repositories
| KB ID: | 4230 |
| Product: | Veeam Backup & Replication | 12 | 12.1 | 12.2 | 12.3 | 12.3.1 | 12.3.2 | 13 | 13.1 |
| Published: | 2021-10-28 |
| Last Modified: | 2025-02-28 |
Cheers for trusting us with the spot in your mailbox!
Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest
Oops! Something went wrong.
Please, try again later.
Challenge
As Backup or Backup Copy jobs run targeting an SMB share on a NAS where the Recycle Bin* is enabled, the metadata files (VBM) can become captured in that Recycle Bin folder. Over time this may cause the following side-effects:
- Repository Rescan completion time takes longer as more restore points are created.
- Many duplicate backup datasets appear under the Backups > Disk (Imported) section.
- The configuration database may grow excessive, and if that configuration database is stored within a Microsoft SQL Express instance it can grow to exceed the Microsoft SQL Express database size limitation of 10GB.
*The exact feature name may vary depending on the storage vendor. For example, one NAS vendor calls this a "Trashbox"
The same symptoms described in this article can occur if a NAS has snapshotting enabled and it stores those snapshots in a folder within the path set for a Backup Repository, causing Veeam Backup & Replication to attempt to rescan the snapshot folder.
In such a scenario, either configure snapshots to be stored in a different path than the one used by the Backup Repository or review the details in the Solution section for Configuring Rescan Exclusions.
Cause
The underlying reason this issue occurs is that when a Backup or Backup Copy job needs to update the VBM file, rather than modify the known good VBM, a temporary VBM is written to disk. Then, once the write operation is completed, the old VBM is deleted, and the new VBM is renamed. When the Recycle Bin feature is enabled on a NAS, it may capture these deleted VBM files in the Recycle Bin (e.g., @recycle or #recycle). When a Repository within Veeam Backup & Replication is configured to use a path that contains the Recycle Bin (even if hidden), the content of that folder will be scanned during a rescan. The rescan operation recursively searches all folders in the Repository path, looking for VBM files. If a VBM file is located in the Recycle Bin, the rescan operation will create a database entry for the found VBM file and an entry within the UI's Backups > Disk (Imported) section.
Examples:
- An SMB repository configured to use the root of the share (e.g., \\<hostname>\<sharename>\), causing Veeam Backup & Replication to scan the Recycle Bin if enabled in the NAS settings.
Solution
Prevention
When creating a Backup Repository, always specify a path that is to a dedicated folder, not to the root of a share or drive.
For example:
- \\<nas_hostname>\<sharename>\Backups\
- D:\Backups\
Disable NAS Recycle Bin
If an existing SMB Share repository is experiencing the side effects described in the Challenge section of this article, do the following:
- Disable and Empty the Recycle Bin on the NAS for the share used by Veeam Backup & Replication.
(Reference the storage vendors' documentation for information on how to do this.) - Remove from configuration all duplicate entries listed under Backups > Disk (Imported)
Configuring Rescan Exclusions
For situations where the Recycle Bin cannot be disabled or other folders sharing the Backup Repository path are being unneccasarily scanned (e.g., Snapshot folder), configure the VBRRescanExclusion setting to exclude directories from Veeam Backup & Replication storage rescan operations:
Key Location: HKLM\SOFTWARE\Veeam\Veeam Backup and Replication\
Value Name: VBRRescanExclusions
Value Type: Multi-String Value (REG_MULTI_SZ)
Value Data: (See notes below)
Notes
- Each line of the registry value should contain a single folder name that will be excluded.
- Entries are not case sensitive (e.g., FolDeR = folder).
- Wildcards (
*) are not officially supported. Use of an asterisk (*) will be interpreted as the literal symbol in the folder name.
Example value:
#snapshot or #recycle.
More Information
If the share path used by the Veeam Backup & Replication Repository is also used for other non-Veeam data, the rescan operation will scan those folders, causing Rescan operations to take an excessive amount of time to complete. To mitigate this situation, create a dedicated folder for backups on the share (e.g., \\<hostname>\<sharename>\Backups\) and move Veeam Backup & Replication Backup Files.
For performance reasons, it is best to make sure that the path provided for repositories in Veeam Backup & Replication is that of a dedicated folder containing only backup files.
| Problematic | Better Option |
| E:\ | E:\VeeamBackup\ |
| \\nas\share\ | \\nas\share\VeeamBackups\ |
| /home/veeam/ | /home/veeam/backups/ |
Note that the "Problematic" path examples are problematic only because there can be files other than Veeam's backup files placed in those paths, meaning that when Veeam Backup & Replication performs a rescan operation, it has to review irrelevant data.
If this KB article did not resolve your issue or you need further assistance with Veeam software, please create a Veeam Support Case.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.