I recently encountered a problem with NTBackup that required me to develop a new perspective on the common scripting task of iterating through collections of folders and files. The problem was that a user had accidentally deleted a file on one of our company's file servers, but she had only a vague idea of the file's name or its folder's name. I couldn't find the file by using the volume shadow copy replicas on the server, so I put in the previous night's backup tape, fired up NTBackup, and started looking for the file in NTBackup's restore window. At this point, I became painfully aware that NTBackup doesn't provide a way to search a backup catalog.
A Scripted Solution
My first idea to solve this problem was to create full-detail backup reports using NTBackup's /L:f option. (You can read about and download my NTBackup scripts in the Windows IT Pro article "Want a Flexible Automated Backup Solution?" http://www.windowsitpro.com, InstantDoc ID 44990.) When you run backups with this option, NTBackup logs the full path and filename for each file in the backup. This method has some shortcomings, though. The first is that the log files can be quite large, depending on the type of backup. If you email or print a large log file after a backup, you could generate a lot of network traffic or use a lot of paper. . . .
Why become a VIP member?
 |
VIP-only online access |
 |
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library |
 |
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine |