Following on from my inital investigation into backing up a windows2000 server using ntbackup I have written a script that ignores the ntbackup catalog files and the internet explorer cache files. It uses reg.exe from the support tools. Reg.exe is native to xp, but part of the NT4 and Windows 2000resource kit. I used the version that comes with the windows 2000 resource kit.
@echo off goto :start :: *************************************************************************************** :: * Batch file to ensure that backup does not try to backup ie cache and backup catalogs :: * Needs reg.exe available in q:\common\software\microsoft (originally from support tools) :: * Note that \0 delimits individual lines of the exclusion. :: * I have grouped each set of exclusions into groups to make it more obvious what is being ignored. :: * Usage: dontbackup_regedit.bat :: * 26.07.04 Version 1.1 - added BITS, BackupCatalog and iecache to registry settings. :: * :: **************************************************************************************** :start reg add HKLM\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup /v BITS /t REG_MULTI_SZ /d "%%ALLUSERSPROFILE%%\Application Data\Microsoft\Network\Downloader\*" reg add HKLM\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup /v BackupCatalog /t REG_MULTI_SZ /d "%%ALLUSERSPROFILE%%\Application Data\Microsoft\Windows NT\NTBackup\cat*.*\0%ALLUSERSPROFILE%\Application Data\Microsoft\Windows NT\NTBackup\catalogs51\qtc*.*" reg add HKLM\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup /v iecache /t REG_MULTI_SZ /d "%%USERPROFILE%%\Cookies\index.dat\0%%USERPROFILE%%\Local Settings\History\History.IE5\index.dat\0%%USERPROFILE%%\Local Settings\Temporary Internet Files\Content.IE5\index.dat"
