cancel
Showing results for 
Search instead for 
Did you mean: 

BESR 8.5 - Backing up on several USB HDDs

OliverDD
Level 3
Hi Guys,

i got a problem using Backup Exec System Recovery 8.5 (Windows Server 2003/2008).
Is it possible to back up the Server (System-Drive and Data-Drive) to several USB Harddiskdrives?
The problem is, that the USB Drive must have an unique name.

How can i configure this Backup method?



Regards
19 REPLIES 19

criley
Moderator
Moderator
Employee Accredited
This might help you:

http://support.veritas.com/docs/313633

OliverDD
Level 3
Hi,

thank you for your answer.
Ok but my Problem is, i wont create for each day a backup job.
Now i have 5 external USB Drives named Monday, Thuesday, Wednesday... Friday and for each day a backup task, because the name must be unique.
I want to create only one backup task for all days using several external drives ?!? Is it possible?

Regards

EHorwitz
Level 3
Oliver:

Not sure what you're looking for. Do you want to do a full backup each day, with no incrementals?

Are all five USB drives plugged in all the time, or are you physically removing any (for rotation, offsite, or whatever)?

Thanks -

OliverDD
Level 3
Hi,

"Are all five USB drives plugged in all the time, or are you physically removing any (for rotation, offsite, or whatever)?"

No its only one of this 5 drives plugged in for the backup (rotation). I thnik thats the problem, because BESR cannot find the other Restore Points. ?!?


Regards
(sprichst du deutsch?)

marcogsp
Level 6
Oliver -- The level of refinement you require could be done, but requires using a VBS script to create the jobs.  The VBS script would be scheduled to run via the Windows Task Scheduler instead of the BESR job scheduler.  This makes the imaging process a one time job that can be run as many times as needed.  My time in the forum is very limited today, otherwise, I would post an example script.  I'll try to come with a sample as time permits

OliverDD
Level 3
This would be really brilliant.

OliverDD
Level 3
*push*

marcogsp
Level 6
Hi OliverDD -- I started coding this project today and I may be able to post something either this evening (New York time zone)  or tommorow.  I ran into an obstacle  with the External USB drive selection routines, but I have overcome that obstacle.  The rest of the project is just adapting code I've already written.

No promises on the above time line.  Please keep in mind that my normal job responsibilities have first priority over participation in the forums.  Today was particularly busy since I was out tof the office most of yesterday due to illness.  So, please be patient and I will eventually have some code for you to try out.  This has been an interesting project and I've discovered some things that I can use elsewhere on my network

Marco

marcogsp
Level 6
OliverDD -- Could you please post the following information?
  • The drive letters assigned to the five USB drives that are being rotated
  • The drive letters of the drives you wish to image with BESR
I would like to post the sample with the drive letters used in your environment,  This will make the sample more usable to you without too much editiing.

Marco

OliverDD
Level 3
Hi,

the drive letters are always the same. In this case Letter X:
I wanna backup the System drive C: and the Data Drive D:


Thank you so much.

marcogsp
Level 6
Oliver-DD -- Im going to post the script in a separate thread, since it is lengthy.  There are some things to be aware of with this script.
  • The script invokes a One-Time imaging job. One-Time imaging jobs can be invoked as many times as needed.  Scripting just removes the need to specify the job parameters manually.  The drawback is that this type of job is always a full backup. No incremental images will be written.  The jobs are not entered in the Run or Manage Backups interface  The recovery points can be managed in the Manage Backup Destinmation interface, but you will need to delete any old images yourself. 
  • Part of the reason for using the One-Time imaging type is that BESR only allows one recurring imaging job for a drive.  The job is allowed to image more than one drive.  However if another recurring job specifies a drive already specified in another recurring job, the job setup will fail.  Also, trying to span incremental images across several drives is proving troublesome.  A One-Time job with full backup is the most practical choice for now.
  • The script meets the requirements for a unique imaging job storing its images on the specified external drive.  The images will be stored in a folder based on the date the script was invoked. i.e  X:\23-Jul-09
  • If the script is executed more than once per day, the storage folder will be destroyed and recreated.  Any recovery point images in the folder will be lost.
  • You can assign each drive its own drive letter, as long as the external drive array in the script is updated

marcogsp
Level 6
Just copy the text below to a text file an save it with a .vbs extension.  The file can be named anything descriptive as longs as it has the .vbs extension.  There is text within the script describing a sample batch file which can be used with Windows Task Scheduler to schedule this script to run.


Option Explicit

'' BESR-Job.vbs
''
''
'' Description: The user defines an array of external drives to be used for storing BESR Images
'' The script will then determine if any of the external drives are attached.
'' If not attached, the script and imaging process are aborted.
'' The first external drive found will be the drive used. The search process will cease.
''
'' A One-Time imaging job will be created and the images will be stored in a folder
'' reflecting the current date i.e. X:\23-Jul-09
'' The image job will always be a full backup -- no incrementals.
'' The job will not be reflected as a recurring job in the BESR task Scheduler.
'' BESR will be able to manage the images created in the Manage Backup Destinmation interface.
'' Deleting aged images will be the user's responsibility
''
'' Executing: The script can be invoked from the command line i.e cscript.exe BESR-Job.vbs
'' Invoking command from a batch file will allow the script to be used with
'' Windows Task Scheduler for repeated use.
'' Sample batch file contents: Cscript.exe "D:\Scripted-Tasks\BESR-Job.vbs"


Dim oFSO, oV2iAuto, oWSHShell
Dim aUSBDrives, oDriveLetter
Dim sDriveLetter, sDestDriveLetter, sPath
Dim sDay, sWeekdayName, sMonth, sYear, sDateTime
Dim sServerName, sVolumesArray
Dim oVolume, oTempVolume
Dim oVolume_C, oVolume_D
Dim oNetLocation_C_Image
Dim oNetLocation_D_Image
Dim oPREIMAGE, oPOSTSNAP, oPOSTIMAGE
Dim oImageJob


'' Construct array of USB drives used to store BESR images
'' Edit to reflect drive letters used in your environment
'' Note: No colons or backslashes used in Array

'' Sample for array of five drives
'' aUSBDrives = Array("V","W","X","Y","Z")

'' Define array of external drives on line below
aUSBDrives = Array("X")

' Iterate through the array and determine which USB drive
' if any, is attached to the server

Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")

For Each oDriveLetter In aUSBDrives

   sDriveLetter = oDriveLetter

     Select Case oFSO.DriveExists(sDriveLetter)

         Case True

           sDestDriveLetter = sDriveLetter

           Exit For

       Case False

           WScript.Sleep 0

       Case Else

            WScript.Echo "Drive status cannot be determined" & VbCrLf

     End Select

Next

' Were any of the USB drives actually attached?

If sDestDriveLetter = "" Then

     WScript.Echo "None of the designated USB drives were attached to the server."
     WScript.Echo "Aborting imaging process." & VbCrLf
     subCleanup

Else

     WScript.Sleep 0
     WScript.Echo "Drive letter " & sDestDriveLetter & " is attached."
     WScript.Echo "Proceeding............." & VbCrLf


End If

'' Construct destination folder path then create folder.
'' The folder name will be based on the current Date
'' and in DD-MMM-YY format


sDateTime = Now

sDay = DatePart("d",sDateTime)

sWeekdayName = WeekdayName(DatePart("w",sDateTime))

WScript.Echo "Day of the month is: " & sDay & VbCrLf
WScript.Echo "Weekday name is: " & sWeekdayName & VbCrLf

'Extract only first three letters of the month
sMonth = Left(MonthName(DatePart("m",sDateTime)),3)

WScript.Echo "The month is: " & sMonth & VbCrLf

'Extract only last two digits of the Year

sYear = Right(Year(sDateTime),2)

WScript.Echo "The Year is: " & sYear & VbCrLf

sPath = sDestDriveLetter _
& ":\" _
& sDay & "-" _
& sMonth & "-" _
& sYear

WScript.Echo "The path for image storage is: " & sPath &VbCrLf

'Create or recreate folder as needed.

Select Case oFSO.FolderExists(sPath)

     Case True

         'Destroy folder then recreate it

         oFSO.DeleteFolder(sPath)
         oFSO.CreateFolder(sPath)
         WScript.Echo "Folder destroyed and recreated."

     Case False

         'Create the folder from new
         oFSO.CreateFolder(sPath)
         WScript.Echo "Folder created from new"

    End Select

'*****************************************************************
'' Imaging Section of Script

'' Determine computer name and set appropriate varaible

Set oWSHShell = WScript.CreateObject( "WScript.Shell" )
sServerName = oWSHShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )

WScript.Echo "The server name is: " & sServerName & VbCrLf

'' Create the BESR automation object and connect to the local BESR agent

Set oV2iAuto = CreateObject("Symantec.ProtectorAuto")
Call oV2iAuto.Connect(sServerName)


'
' Find the volumes to image
'

On Error Resume Next

sVolumesArray = ""
WScript.Echo "The array is now populated with: " & sVolumesArray & VbCrLf

For Each oTempVolume in oV2iAuto.Volumes(false)

     Select Case oTempVolume.MountPoint

         Case "C:\"

         Set oVolume_C = oTempVolume
         sVolumesArray = "oVolume_C.ID"

         WScript.Echo "The current mountpoint is: " & oTempVolume.MountPoint
         WScript.Echo "Volume ID for C:\ is: " & oVolume_C.ID
         WScript.Echo "The array is now populated with: " & sVolumesArray
         WScript.Echo VbCrLf

     Case "D:\"

         Set oVolume_D = oTempVolume
            If sVolumesArray = "oVolume_C.ID,oVolume_D.ID" Then
            WScript.Sleep 0
            Else
           sVolumesArray = sVolumesArray & ",oVolume_D.ID"
           End If

         WScript.Echo "The current mountpoint is: " & oTempVolume.MountPoint
         WScript.Echo "Volume ID for D:\ is: " & oVolume_D.ID
         WScript.Echo "The array is now populated with: " & sVolumesArray
         WScript.Echo VbCrLf

     Case Else

         Wscript.Sleep 0

     End Select


Next



On Error GoTo 0

'' Define objects for storing volume images and set image file name spec.

Set oNetLocation_C_Image = CreateObject("Symantec.VProRecovery.NetworkLocation")
oNetLocation_C_Image.Path = sPath
oNetLocation_C_Image.FileSpec = sServerName & "_C"

Set oNetLocation_D_Image = CreateObject("Symantec.VProRecovery.NetworkLocation")
oNetLocation_D_Image.Path = sPath
oNetLocation_D_Image.FileSpec = sServerName & "_D"


'' Uncomment for any PreImaging, Post Snapshot or Post Imaging Tasks required


'''''''''''''' Preimaging Tasks ''''''''''''''''''''''''''''''''

' Set oPREIMAGE = CreateObject("Symantec.VProRecovery.CommandFile")
' oPREIMAGE.Timeout = 720
' oPREIMAGE.Name = "PREIMAGE"
' oPREIMAGE.Folder = "D:\Scripted-Tasks\BESR\"
' oPREIMAGE.Filename = "StopSQLServices.bat"
' oPREIMAGE.Validate()

'''''''''''''' Post Sanapshot Tasks ''''''''''''''''''''''''''''''''

' Set oPOSTSNAP = CreateObject("Symantec.VProRecovery.CommandFile")
' oPOSTSNAP.Timeout = 720
' oPOSTSNAP.Name = "POSTSNAP"
' oPOSTSNAP.Folder = "D:\Scripted-Tasks\BESR\"
' oPOSTSNAP.Filename = "Postsnap.bat"
' oPOSTSNAP.Validate()

'''''''''''''' Post Imaging Tasks ''''''''''''''''''''''''''''''''
' Set oPOSTIMAGE = CreateObject("Symantec.VProRecovery.CommandFile")
' oPOSTIMAGE.Timeout = 720
' oPOSTIMAGE.Name = "POSTIMAGE"
' oPOSTIMAGE.Folder = "D:\Scripted-Tasks\BESR\"
' oPOSTIMAGE.Filename = "StartSQLServices.bat"
' oPOSTIMAGE.Validate()



' Create the image job
'

Set oImageJob = CreateObject("Symantec.VProRecovery.ImageJob")
oImageJob.IncrementalSupport = False
oImageJob.DisplayName = sWeekdayName & " Full Backup"
oImageJob.Description = sWeekdayName & "-- Full backup of C: and D: Drives"

'' Uncomment desired image compression level, comment undesired levels

'oImageJob.Compression = oImageJob.Constants.ImageCompressionNone
'oImageJob.Compression = oImageJob.Constants.ImageCompressionLow
oImageJob.Compression = oImageJob.Constants.ImageCompressionMedium
'oImageJob.Compression = oImageJob.Constants.ImageCompressionHigh


oImageJob.Reason = oImageJob.Constants.ImageReasonManual
oImageJob.Volumes = Array(sVolumesArray)
oImageJob.Quota = 0
oImageJob.Task = Nothing

'' Uncomment if running any Pre, or post tasks

'oImageJob.CommandFile("PREIMAGE") = oPREIMAGE
'oImageJob.CommandFile("POSTSNAP") = oPOSTSNAP
'oImageJob.CommandFile("POSTIMAGE") = oPOSTIMAGE


oImageJob.Location(oVolume_C.ID) = oNetLocation_C_Image
oImageJob.Location(oVolume_D.ID) = oNetLocation_D_Image
oImageJob.RunOnce = True




' Add the image job to jobs list

Call oV2iAuto.AddImageJob(oImageJob)

'Execute the image job now!!!!

Call oV2iAuto.DoImageJob(oImageJob.ID, oImageJob.Constants.ImageTypeFull)



' ' Run object cleanup subroutine
subCleanup




'' subCleanup
'' Purpose: Cleans up Objects and quits the script

Sub subCleanup
Set oFSO = Nothing
Set oDriveLetter = Nothing
Set oV2iAuto = Nothing
Set oWSHShell = Nothing
Set oVolume = Nothing
Set oTempVolume = Nothing
Set oVolume_C = Nothing
Set oVolume_D = Nothing
Set oVolume = Nothing
Set oNetLocation_C_Image = Nothing
Set oNetLocation_D_Image = Nothing
Set oPREIMAGE = Nothing
Set oPOSTSNAP = Nothing
Set oPOSTIMAGE = Nothing
Set oImageJob = Nothing


WScript.Quit
End Sub

OliverDD
Level 3
Hi,

I tried the Script but i get an error: Symantec.vbs(154, 1) Runtimeerror in Microsoft VBScript: ActiveX-Components cant create Objects: 'Symantec.ProtectorAuto'


Do you have an Idea?

marcogsp
Level 6
I'm willing to bet that you tried the script with Server 2008 first.  The 64 bit version of Cscript.exe is not compatible with the BESR automation objects.  Please use the 32 bit version located here:

C:\windows\SysWOW64\

The technote below also explains:

http://seer.entsupport.symantec.com/docs/293928.htm

OliverDD
Level 3
Hi,

The Script works fine, Thank You.
I have two more questtions :)
How i can delete the restorepoints when the usb drive has reached the capacity?
Is ist possible to use the E-Mail notification?

Regards

marcogsp
Level 6
It is possible to have either BESR send email notification, or to have the script generate the email message and send it.  I'm going to test scripting BESR to send the message.

As for drive space maintenance, you may want to read AndrewPGB's post linked below.  He posted after I posted my script, and his solution may work for your situation as well.  Otherwise, you'll have to manually monitor the drivespace and delete recovery points manually.  Also, Andrew's solution works with incremental imaging jobs.

https://www-secure.symantec.com/connect/forums/howto-usb-drive-rotation-besr-70-85

OliverDD
Level 3
Ok thank you.
ok to delete the recovery points i can write a batch that delets the recovery points before the backup job begins.

marcogsp
Level 6
Sure, there are many sample batch files available on the Internet that demonstrate monitoring free disk space and deleting files and folders  based on their age.  Scheduling the batch file to run before the backup is one way of doing it, and probably best if you are not comfortable with editing scripts

Alternatively, there is also a section in the script for adding a pre-imaging command file.  It would just have to be uncommented (remove the single quotes  '  in the appropriate places) in order to make that section of the script active.  Sample below:

'''''''''''''' Preimaging Tasks ''''''''''''''''''''''''''''''''

Set oPREIMAGE = CreateObject("Symantec.VProRecovery.CommandFile")
oPREIMAGE.Timeout = 720
oPREIMAGE.Name = "PREIMAGE"
oPREIMAGE.Folder = "D:\Scripted-Tasks\BESR\"
oPREIMAGE.Filename = "DeleteImages.bat"
oPREIMAGE.Validate()

Then again in the "Create the image job" section, one more line would have to be uncommented to run the pre-imaging command file. see below.

'' Uncomment if running any Pre, or post tasks

oImageJob.CommandFile("PREIMAGE") = oPREIMAGE
'oImageJob.CommandFile("POSTSNAP") = oPOSTSNAP
'oImageJob.CommandFile("POSTIMAGE") = oPOSTIMAGE



OliverDD
Level 3
Hi,

whats the difference between version BESR 8.5 and BESR 2010 for SBS??
The Script doesnt run under BESR 2010... ?!?!


Regards