Create a ShoreTel backup script and task

ShoreTel backups – scheduled
Categories: ShoreTel
by Peter Doyle

Shoretel provides a nice and simple script which can back up all the data you need and also managed how many backups it will keep, doing the house keeping for you. We have found most people do not backup their ShoreTel servers. I assume this is because people don’t have time, or just forget. When setting this up I would recommend backing up to a network drive which will benefit from your normal backup procedure.
On your Shoretel server if you browser to this folder:
C:Program Files (x86)Shoreline CommunicationsShoreWare ServerScriptsSample_Backup_Restore
(x86) for 64 bit installation of windows server, the rest of this procedure will not include this term as it was written on a 32 bit system. For 64 bit implementations just add “(x86)” after program files.
Make a copy of the file sw_backup_restore.ini in the same folder and open the original one. find the paragraph starting: “[Backup Options]” and change the highlighted text below in the file to match your environment.
[Backup Options]
Backup.Drive = C:
Backup.Root.Directory = Shoreware BackupBackup
Backup.ShoreWare.Directory = Shoreline Data
Backup.Archive.Size = 2 ;folders
a Backup.Archive.Size of 2 means it will keep 2 previous backups as well as the one it has just taken meaning 3 in total.
Once the ini file is setup then you will need to Scheduled a job using the windows scheduler. Click start and type: Task scheduler and it will be the only result, Once open click on create Basic task. (backups need to be done out of hours)

Give the task a name and description. click next.

Pick how often you wan the backup to happen, this example shows weekly. one the next screen pick the times which suits your company, remember that the backup has to be done out of hours and requires about 30 mins to complete, but i would allow upto 1hr. Also the chosen time should be at least 3 hours before “in hours”. (for example if the office opens at 9am the backup should not happen any later than 6am) this is to allow time for the recovery script to run incase of issues with the backup.
Select that you want to run a program.

in the script filed put in “C:Program FilesShoreline CommunicationsShoreWare ServerScriptsSample_Backup_Restorehq_backup_all.bat” with quotation marks. or “C:Program Files (x86)Shoreline CommunicationsShoreWare ServerScriptsSample_Backup_Restorehq_backup_all.bat” for 64 bit installations

click next:

Check your setting and click finish.
Select the task in the task scheduler and right click and select properties

Change the security options to Run when the user is logged in or not and run with highest privileges.

select the settings tab and change the parameters to the following:

If backing up to a network drive make sure it is mapped, your system is now scheduled for back ups.
Recovery script: If the backup files for any reason it will not restart the ShoreTel services, so running the start service script 3 hours after the backup will make sure the phone are ready for use when the office opens, If the backup was successful, running this script has no affect to the system.
Set up another task with the same parameters as the backup but to run 3 hours after the backup task. this task needs to run the file
C:Program Files Shoreline CommunicationsShoreWare ServerScriptshq_shoretel-start-svcs.bat
(if running on an 64 bit system the batch file will need to be edited and ” (x86)” added to program files on the file path within the bat file)