Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backing up multiple directories with ntbackup?

Status
Not open for further replies.

mikeQA

Programmer
Sep 29, 2008
22
US
Hi,

I tried using ntbackup to backup multiple directories on the same drive but it only takes the first one. I'm doing exchange information store directory backups. I don't know the format of the @file so I figured I should be able to just pass it along the lines of:

ntbackup g:\exchange_2007 g:\exchange_2007_public g:\exchange_third_group etc...

but it always is only taking the first directory. I set up the stores in separate directories on g: (test environment here) and run load generator on the various stores to show data change, etc...final backup will be with NBU or TSM (down the road) as well for testing on our appliance. Basically a cold backup of the information stores. How can this be done with ntbackup when on the same drive?

Thanks in advance!

Mike
 
Use .bks file to specify more than one target for ntbackup. Example:
ntbackup.exe backup "@C:\scripts\backups\exchange.bks"

Contents of exchange.bks file (simple text file):
g:\exchange_2007
g:\exchange_2007_public
g:\exchange_third_group

you can also exclude some subdirectories or files, i.e. if you backup all contents of G: excluding test store and Recycle Bin contents, then exchange.bks might be like this:
g:\
g:\exchange_test\ /Exclude
g:\RECYCLER\ /Exclude


===
Karlis
ECDL; MCSA
 
This is what I am getting in the log(s):

The saved selection file "@C:\Sepaton\scripts\exchangebackups.bks" cannot be found

Remember, this is being run from a cygwin bash shell on the system in question. All our windows testing runs through cygwin bash shells for our perl scripts.

I've tried the forward slash vs backslash, I'll escape the backslashes to see if it makes any difference.

Mike

 
Wow, I feel stupid....lol. I figured it out just now. The filename.bks is just that, not @filename.bks! Once I took it out of the filename itself it all fell into place.

God...talk about noobish-ness! HAHAHA, anyways, now that that is resolved I can move foward! Yay!

Thanks for the reply!

Mike
 
Well, It seems it still requires the file to be in unicode format when saved. If I save it as a text file it kicks up GUI then exits immediately. When I re-save it in unicode format then the GUI stays up and it does its backup.

I read on the net that it had to be in unicode format, then saw something stating otherwise. This is 2003 RC2 SP2 Server (Enterprise edition, 64 bit). Thoughts? if it has to be in unicode format we may just create it manually and pass the filename to the test on the command line (will be doing it that way as it is. If I can create and save as unicode within perl that's ok too. Problem is each exchange server directory layout is different so manual file creation is going to probably be the norm.

Mike
 
'You may also encounter this error if the .bks file was created or edited by using a text editor, and then saved in American National Standards Institute (ANSI) format instead of Unicode. This file must be in Unicode.'

Actually I don't knew it before, because I create these files using ntbackup GUI or by copying and editing existing file, and never had such problem.

===
Karlis
ECDL; MCSA
 
Hi Karlis,

I'll have to write a small perl script and see if it fails to run. I think I may be able to do it or set it to unicode but have to check on that today as time permits. I'm just trying to fully automate it but that just means a longer command line passing in the paths. I'd rather just create it manually and save as unicode via notepad.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top