ShoreTel Forums  

Go Back   ShoreTel Forums > ShoreTel Tech > Administrators

Reply
 
LinkBack Thread Tools Display Modes
Old 08-24-2008, 04:05 AM   #1
Junior Member
 
Join Date: Aug 2008
Location: Oregon
Posts: 1
Backup Data to Remote Server for DR

ShoreTel Server Disaster Recovery

I cannot take credit for all this so here are my sources.

Antimail : Script recipe of the week: how to copy an opened file
Workstation Open File Backup Using Robocopy And Vshadow

Using these two scripts we have made the backup script here that copies the Shoreline Data folder onto a backup server in a different location over the network each weekend. It uses the Shadow Copy component of Windows Server 2003 so it will backup even the files that are in use by the ShoreTel phone system. This meets our disaster recovery goals of being able to bring the phone server back online within minuets of a disaster at our primary data center. The loss of changes made to the phone system during the past week is acceptable to us. You could run this backup script daily if that does not meet your goals.


1. Create a scheduled backup of ShoreTel data to your backup server according to the following:

a. You need to get three programs from Microsoft and copy them into the c:\backup folder they are.
i. Vshadow.exe
ii. Robocopy.exe
iii. Dosdev.exe

b. Next you need to create a script backup.cmd in the backup folder that contains the following “code”:

Code:
setlocal 

@REM test if we are called by VSHADOW
if NOT "%CALLBACK_SCRIPT%"=="" goto :IS_CALLBACK

@REM
@REM Get the source and destination path
@REM

@rem set SOURCE_DRIVE_LETTER=d:
@rem set DESTINATION_PATH=\\sgserver2\d$\Shoreline Data

set SOURCE_DRIVE_LETTER=%~d1
set SOURCE_RELATIVE_PATH=%~pnx1
set DESTINATION_PATH=%2

@REM
@REM Create the shadow copy - and generate env variables into a temporary script.
@REM 
@REM Then, while the shadow is still live
@REM recursively execute the same script.
@REM

@echo ...Determine the scripts to be executed/generated...

set CALLBACK_SCRIPT=%~dpnx0
set TEMP_GENERATED_SCRIPT=GeneratedVarsTempScript.cmd

@echo ...Creating the shadow copy... 

%~dp0\vshadow.exe -script=%TEMP_GENERATED_SCRIPT% -exec=%CALLBACK_SCRIPT% %SOURCE_DRIVE_LETTER%

del /f %TEMP_GENERATED_SCRIPT%

@goto :EOF

:IS_CALLBACK
setlocal 

@REM
@REM This generated script should set the SHADOW_DEVICE_1 env variable
@REM

@echo ...Obtaining the shadow copy device name... 

call %TEMP_GENERATED_SCRIPT%

@REM
@REM This should copy the file to the right location
@REM

@echo ...Copying from the shadow copy to the destination path... 

@rem
@rem copy "%SHADOW_DEVICE_1%\%SOURCE_RELATIVE_PATH%" "%DESTINATION_PATH%"

@rem create shadow drive.
dosdev.exe B: %SHADOW_DEVICE_1%

@rem make backup of files.
robocopy.exe "B:\%SOURCE_RELATIVE_PATH%" %DESTINATION_PATH% /MIR

@rem destory shadow drive.
dosdev.exe -r -d B:


c. You run the script by going into the c:\backup folder, and running backup.cmd “local directory to backup” “\\path to remote server\target directory\” you will need to make sure that the user that is running the script has access to both directories.

d. Now you can schedule the script to run daily/weekly/whatever.





2. Configure all ShoreTel phones, and switches to boot via DHCP to get FTP server from DHCP options.

a. See ShoreTel, and Microsoft Documentation to configure switches for DHCP, and IP address reservations in MS DHCP server for your ShoreTel switches.

3. To recover from a disaster.

a. Change the IP address of your ShoreTel server in the ShoreWare.mdb on your backup server.
i. You will need MS Access, and it’s in the switches table.

b. Install the ShoreTel software on your backup server.

c. Contact ShoreTel to get a new license as the MAC address has changed it will need re-licensed. They should do this for free as your primary server is down. You will need to do this again once you can bring your primary server back online.

d. Update your DHCP ftp option to point to the backup servers IP address.

e. Reboot your switches, and then phones.
Attached Images
File Type: jpg image001.jpg (19.5 KB, 66 views)

Last edited by yaplej; 09-10-2008 at 09:05 PM. Reason: Updated to include updating switches, and phones.
yaplej is offline   Reply With Quote
Old 10-03-2008, 01:34 PM   #2
Senior Member
 
Join Date: Mar 2007
Location: Georgia
Posts: 103

great posting.... thanks a bunch!!!!
travisbconley is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:52 AM.


Powered by vBulletin® Version 3.7.0 Release Candidate 2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0