Wednesday, September 10, 2008

ShoreTel Server Disaster Recovery

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

http://blogs.msdn.com/adioltean/archive/2005/01/05/346793.aspx
http://www.eggheadcafe.com/tutorials/aspnet/f6972828-1e81-4cd4-ae0c-36196a82ed25/workstation-open-file-bac.aspx

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”:

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.

Thursday, May 29, 2008

WAN Acceleration

I have been searching for a cost effective WAN acceleration solution for work, but have found nothing. It seems that everyone wants around $150,000+ to implement WAN acceleration at our 12 offices. So I found a little project that is currently getting underway called TrafficSqueezer.

Its an open source projected dedicated to developing a network acceleration application. Looks like an interesting project.

Open Source WAN Accelerator
http://trafficsqueezer.sourceforge.net/

Saturday, April 12, 2008

Reasons for a dedicated SQL server

We recently built a dedicated SQL server for a project at work. Nothing massivly huge just a Dell 2850 with dual 3.0Ghz CPUs, and 4GB of ram. However I started to think about the benefits to having a dedicated machine running your SQL databases.

Most companies like us probably end up have numerous applications that require an SQL database. Most of these install SQL Express for this. So you end up with multiple application servers all running their own instance of SQL Express. This is a huge waste of system resources. The memory, and processing power required to run SQL could be saved by running a dedicated SQL box.

We have started taking this approach, and have reduced the memory requirement of many of our application servers by moving all the databases to our dedicated SQL server.

Our applications perform better because the database is much faster. It has more memory cpu, and disk io avaliable than before. The application servers are only running the application so that makes it even faster.

Now the problems you have is that when you need to take down your SQL server all your applications come down too. We are resolving this by using database mirroring.

OpenOffice Revisited

Several years ago I evaluated the possibility of using OpenOffice as a replacement to MS Office for basic users. It fell through due to performance issue with the application, and usability when compared to the MS Office suite.

I just saw an add for OpenOffice, and thought I would give it another go. I'm actually impressed with how far it has come along so we are now evaluating it again at my current employer.

I have found several small issue with the current build 2.4 that should be address in build 3.0 such as the ability to open Office 2007 documents. However we are not using Office 2007 in any substantial way so its not that big of an issue for us.

Thursday, December 20, 2007

Cisco CE500

This is more of a rant than anything, but I feel that its very cheap of Cisco to have left the CLI out of their CE500 line. I know that the switch is marketed to the SMB, but common places with 50-250 users still might want the CLI for remote/automated management. Not everyone in the SMB IT dept is a GUI only nut.

Some of us dont feel the need to purchase a $2000+ switch for PoE, and dont need L3 routing forced on us to get PoE. The CE500 does a fine job at switching, and PoE. Just put the darn CLI in the CE500. OK Cisco!

Sunday, December 9, 2007

Fixing DFSR after an AD domian rename

After renaming an Active Directory domain DFS Namespace Folders no longer recognize their Replication Groups. The Replication Groups are not updated during the normal domain rename process, and replication fails between members.

In the DFS Management tool the Namespace Folders will not display as having replication configured, and the Replication Groups will display old DFS Namespaces. To resolve this issue the DFS Replication Groups must be manually updated to reflect the domain name changes made. This can be accomplished using ADSIEdit tool found in the Windows 2003 Support Tools.

1. Open ADSIEdit.msc.
2. Locate the DFS Replication Group settings “Domain\DC=domain,DC=com\CN=System\CN=DFSR-GlobalSettings”.
3. Rename each of the effected Replication Groups using double slashes between sections of the Replication Group Name. “CN=domain.com\\{DFSRNamespace}\\{DFSRFolder” the double slashes will automatically be removed after you refresh “Domain\DC=domain,DC=com\CN=System\CN=DFSR-GlobalSettings”, but are required for some of the calculated values for the DFS Replication Group to be correct.
4. For each Replication Group correct the “msDFSR-DfsPath” value to reflect the correct DFS Namespace Folder for this Replication Group. This is located in “Domain\DC=domain,DC=com\CN=System\CN=DFSR-GlobalSettings\{DFSRNamespace}\{DFSRFolder}\CN=Content\ CN={DFSRFolder}” This value should reflect the new DFS Namespace, and Folder. Example “\\domain.com\{DFSRNamespace}\{DFSRFolder}”

Now when you open DFS Management tool all your Namespace Folders should be correctly linked to their proper Replication Group.