batch file to copy backup information


Recommended Posts

Currently i am using the backup utility that is part of Windows NT Server However, i have notice that it has not been backup up as often as it should (every evening) i have a BKS file which contains the locations of each directory that needs backed up.

Could someone write a batch file that i could schedule to run that would copy this data to a Mapped directory (Network Storage)

Here is the contents of the BKS file. and if possible i would need it to replace the previous nights data.

C:\
C:\appservice\ /Exclude
C:\Dell\ /Exclude
C:\Documents and Settings\ /Exclude
C:\JACADA\ /Exclude
C:\Program Files\ /Exclude
C:\RECYCLER\ /Exclude
C:\temp\ /Exclude
C:\test\ /Exclude
C:\tmp\ /Exclude
C:\WINNT\ /Exclude
C:\System Volume Information\ /Exclude

E:\
E:\bin\ /Exclude
E:\Config.Msi\ /Exclude
E:\downloads\ /Exclude
E:\ETIME\ /Exclude
E:\Golf Galaxy\ /Exclude
E:\Golfworks Intranet\ /Exclude
E:\msdownld.tmp\ /Exclude
E:\Program Files\ /Exclude
E:\RECYCLER\ /Exclude
E:\System Volume Information\ /Exclude
E:\TEMP\ /Exclude
E:\winnt\ /Exclude
E:\WUTemp\ /Exclude

Any help is always appreciated thank you.

I believe you can copy while excluding folders using Robocopy with the /xd switch. Dunno if NT Server has it, if not you can grab it here. (assuming it runs on NT Server)

For the C: drive, the command might look something like:

robocopy c: z:\mynetworkshare\backup /e /xd C:\appservice C:\Dell "C:\Documents and Settings" C:\JACADA "C:\Program Files" C:\RECYCLER C:\temp C:\test C:\tmp C:\WINNT "C:\System Volume Information"

Same for the E: drive, just change the drive & excluded folders.

The quick-and-dirty way, if you want to remove the old backup each day, is to do something like

rmdir /s /q z:\mynetworkshare\backup

before running robocopy. But there are also switches that can make robocopy copy only files recently created, or with the archive bit set, things like that.

Hope that helps get you going! If you're not comfortable creating batch files you may want to stick with a GUI backup program, such as Cobian Backup or similar. Or figure out why ntbackup doesn't always run on your system.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.