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.
  • Posts

    • Why? Does anybody actually want this? The constant need to close all browser sessions and wait for a new version to install, just so that there’s a integrated coupon manager feels like a waste of everyone’s time
    • I remember when Louis used to just do interesting Mac/iPhone repairs, now he's boring and just launches "crusades" every week
    • A shame it don't allow people to bypass the MS account, I will stick to using Rufus.
    • Microsoft about to radically change how often your Edge browser updates by Paul Hill Microsoft has just announced that starting with Edge 152, it will be moving to a two-week release cycle for faster, smaller updates. This faster release cadence will begin on August 27. This change comes just several months after Microsoft switched Visual Studio Code to weekly updates. The company said that the Extended Stable releases will remain on an eight-week cycle and that no admin changes are needed to experience the faster release cycle on the Stable channel. The new two-week release cycle will enable the faster delivery of security updates and platform improvements, all while reducing the size and complexity of individual updates. Microsoft claims that organizations will benefit from this change as it offers predictable validation cycles. For organizations that prefer a “more deliberate pace”, the Extended Stable channel remains an option. This change will affect Edge Stable releases on Windows, macOS, Linux, and mobile. The Extended Stable channel will continue to be updated every eight weeks, or every fourth Stable release, for example: versions 152, 156, 160, and 164. The Extended Stable could be a good option for organizations that don’t want the latest updates twice a month and don’t want as much hassle constantly updating browsers. In the case of Visual Studio Code, many of the updates being pushed by Microsoft are AI-related. As we all know, Microsoft Edge has a lot of AI features, so we could see Microsoft pushing more AI, thanks to the faster cycles. On the flip side, quicker releases could mean faster security updates, which is beneficial in a world where AI systems are hunting for software exploits. What do you think? Let us know in the comments. For more updates on Edge, be sure to follow Neowin's coverage. In May alone, we reported on Edge offering in-browser pop-ups to assist users with website compatibility issues, that Edge was losing Copilot Mode, and that Microsoft had fixed a plain-text password bug in Edge. Source: Microsoft 365 Admin Center
    • not yet, because at the moment it is not a threat to MS, if and I mean if it did become a threat to MS Office, then it may be a different thing. MS don't like competition
  • Recent Achievements

    • Week One Done
      davidbazooked earned a badge
      Week One Done
    • One Month Later
      Jamswaz earned a badge
      One Month Later
    • Week One Done
      Jamswaz earned a badge
      Week One Done
    • Rookie
      Marzoid went up a rank
      Rookie
    • Community Regular
      coch went up a rank
      Community Regular
  • Popular Contributors

    1. 1
      +primortal
      514
    2. 2
      PsYcHoKiLLa
      185
    3. 3
      +Edouard
      159
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!