If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Scripted Backup Batch Files
So I have multiple networks and I need to find an easy way to backup every
computer on each network. Each network is setup so that I can create a maped network drive Q: What I want to do is have my management program run a script that will first run my net use commant ensuring that Q: is up and running and then use windows backup (ntbackup.exe) to backup all the users on that PC to the Q: drive I am completely at a loss right now as to how to do this and any help would be greatly appreciated thank you matt egenes |
Ads |
#2
|
|||
|
|||
Scripted Backup Batch Files
Orion wrote:
So I have multiple networks and I need to find an easy way to backup every computer on each network. Each network is setup so that I can create a maped network drive Q: What I want to do is have my management program run a script that will first run my net use commant ensuring that Q: is up and running and then use windows backup (ntbackup.exe) to backup all the users on that PC to the Q: drive I am completely at a loss right now as to how to do this and any help would be greatly appreciated thank you matt egenes You can do the backup without having to map each drive to Q or any other letter. What I use is 'XCOPY \\computername\drive\directory\*.* backupdirectory /D /S /R /Y'. This will copy all the files in the selected directories that are new or changed without requiring user intervention. |
#3
|
|||
|
|||
Scripted Backup Batch Files
So say my batch file would look something like this
net use Q: \\10.250.212.253\FLF01\userdata\%computername% LetMe0ff (that makes sure that my network drive is mounted, and that its dumping the files into the directory of the computer) XCOPY "C:\My Documents\*.*" Q:\ /D /S /H /R /Y Now I am not sure how xcopy works but will this copy over active/open files as well? and will this allow me to restore outlook if the computer crashes. and can I use a command like echo to make a timestamp file every time I run the script, something like echo %date% but written to text file of my choice thank you very much Orion |
#4
|
|||
|
|||
Scripted Backup Batch Files
Orion wrote:
So say my batch file would look something like this net use Q: \\10.250.212.253\FLF01\userdata\%computername% LetMe0ff (that makes sure that my network drive is mounted, and that its dumping the files into the directory of the computer) XCOPY "C:\My Documents\*.*" Q:\ /D /S /H /R /Y That looks right but I am not sure about the net use command as I don't use it. You could test it to make sure. Now I am not sure how xcopy works but will this copy over active/open files as well? It should, unless they are locked. But to make sure I would schedule the script to run when the computer is inactive. and will this allow me to restore outlook if the computer crashes. I don't use Outlook so I don't know about this. and can I use a command like echo to make a timestamp file every time I run the script, something like echo %date% but written to text file of my choice I use the touch command but you could use echo %date% %time% lastbu to do the same thing. thank you very much Orion |
Thread Tools | |
Display Modes | |
|
|