_neutrino Veteran Posted November 4, 2009 Veteran Share Posted November 4, 2009 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. Link to comment https://www.neowin.net/forum/topic/842088-batch-file-to-copy-backup-information/ Share on other sites More sharing options...
sc302 Veteran Posted November 4, 2009 Veteran Share Posted November 4, 2009 Xcopy /s /e /y c:\folder x:\folder You will have to do that for each folder u want copied. Link to comment https://www.neowin.net/forum/topic/842088-batch-file-to-copy-backup-information/#findComment-591802556 Share on other sites More sharing options...
_neutrino Veteran Posted November 4, 2009 Author Veteran Share Posted November 4, 2009 would i have to line item every directory or is there a way to tell it to copy everything except for certain file like the BKS file does? Link to comment https://www.neowin.net/forum/topic/842088-batch-file-to-copy-backup-information/#findComment-591802564 Share on other sites More sharing options...
sc302 Veteran Posted November 4, 2009 Veteran Share Posted November 4, 2009 Line item every directory on the root. Not every directory within the top level directory. Link to comment https://www.neowin.net/forum/topic/842088-batch-file-to-copy-backup-information/#findComment-591802634 Share on other sites More sharing options...
lars77 Posted November 4, 2009 Share Posted November 4, 2009 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. Link to comment https://www.neowin.net/forum/topic/842088-batch-file-to-copy-backup-information/#findComment-591803708 Share on other sites More sharing options...
Recommended Posts