10 February,2017 by Tom Collins
Question: I’d created a load of .BAK files onto an attached disk and requested a flat file backup of all files on the added drive.
The aggregate size of the .BAK files was 10.2 TB but noticed during the flat file backup files being backed up from a folder called DRIVE_LETTER:\$RECYCLE.BIN.
Why is this happening?
Answer: I must admit I’ve been caught out with this one in the past , where I have requested a 20 TB temporary drive to be added and discovered 1.8 TB extra being backed via files I’d deleted and ended up in the hidden $RECYCLE.BIN
When a new drive is created , a hidden folder - $RECYCLE.BIN is added . When you delete a file through Windows Explorer – it’s added to the Recycle Bin.
To see the folder In Windows explorer highlight drive | View | Options | Change folder and search options
Choose Show hidden files , folders and drives & uncheck Hide protected
You can then use the GUI to clear down the recycle bin for the drive or I’ve also run the :
rd /s /q <DRIVE_LETTER>:\$RECYCLE.BIN command – which successfully deleted the contents of the recycle bin.
In effect this command deletes the Recycle Bin – but when you attempt to delete a file the recycle bin is created.
You also have the option of excluding the $RECYCLE.BIN from the flat file backup
Windows Pagefile size for dedicated SQL Servers (SQL Server DBA)
Get Last Windows boot up time with Powershell (SQL Server DBA)
How can I tell if hyperthreading is on Windows 2012 (SQL Server DBA)
How to check Operating System type with Powershell
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |