Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

How to add full Exchange backup to my current NTBACKUP .BKS Script

Hello,

I have NTBACKUP setup to backup files on one machine based off of a .BKS file.  I have a vbs script that I schedule to set the path for the backup.  The contents of the .BKS file are:

C:\Auto\
C:\Documents and Settings\
C:\Inetpub\
C:\WINNT\
D:\Documents and Settings\
D:\VOL1\
SystemState

The contents of the .VBS script are:

'Backup Script to Generate MS Backup File Based on Day
CONST BackupDrive = "E:\Backup"
CONST BackupName = "Daily.bkf"
CONST BackupSelections = "c:\auto\BEFP_Set.bks"

Function GetPath(theDate)
  Dim DayNumber, BkPath
  DayNumber = Weekday(theDate)
      
   Select Case DayNumber
      Case 1      BkPath = "\Sunday\"
      Case 2      BkPath = "\Monday\"
      Case 3       BkPath = "\Tuesday\"
      Case 4      BkPath = "\Wednesday\"
      Case 5      BkPath = "\Thursday\"
      Case 6      BkPath = "\Friday\"
      Case 7      BkPath = "\Saturday\"
      Case Else  BkPath = "\ERROR\"
   End Select
   GetPath = BackupDrive&BkPath&BackupName
End Function

Set WshShell = WScript.CreateObject("WScript.Shell")

strCommandLine = "ntbackup backup ""@"& BackupSelections &""" /j ""Daily Backup Job"" /f " & GetPath(Now)

WshShell.Run (strCommandLine)

Basically this script runs daily and offloads the backup file to the correct folder.  Now this works great, except that I need to perform a backup of the MSExchange store which is on the same box nightly as well.  I tried adding this to the script, but it didn't seem to take:

WTHIBEFP1\Microsoft Information Store\First Storage Group

I can perform a manual backup of the Exchange server using the GUI for NTBACKUP but I need to automate it.  Thanks in advance for the help!
0
electricd7
Asked:
electricd7
  • 3
  • 2
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Create a backup selection file that includes the information store.
0
 
electricd7Author Commented:
How do you mean??
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
This line - it's using a backup selection.  Make a new backup selection for the information store.
CONST BackupSelections = "c:\auto\BEFP_Set.bks"

I use a batch script to do this. See
http://www.experts-exchange.com/Operating_Systems/WinXP/Q_21422934.html
0
 
electricd7Author Commented:
Ahh i see the beauty now!  I will try it tonight..if it works, you got the points.....If I could figure out your script I would probably switch too...nice scripting!
0
 
electricd7Author Commented:
leew..that worked like a charm!  Can I talk with you via email about your backup script?  I am thinking I would like to implement a variation of it here, but am a bit confused on a couple parts of it.  Thanks! and here's your points!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now