No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recommended Backup plan for the shoretel servers

    We want to get a daily or weekly backup of our phone system (all of the shoreline data folder). We have used backup exec to do this but it will not get the database file because it cannot connect to mysql. Does Shoretel recommend anything?

  • #2
    You'll want to make a copy of the Shoreline Data directory and run a backup of the mysql database via the database dump command.


    • #3
      Yes, somewhere on their website or in a manual they talk about a batch file called dump1.bat. This creates a backup copy of your database that Backup Exec can make a backup of. There's a matching batch file called restore1.bat for restoring it. They are located in "C:\Program Files\Shoreline Communications\Shoreware Server\MySQL\MySQL Server 5.0\Examples\" by default.

      The problem is that the dump1.bat file they provide stops and asks you for the root password, so it can't be automated. The line below has been modified to include the root password, so it can be scheduled to trigger just before your backup job runs:

      "C:\\Program Files\\Shoreline Communications\\Shoreware Server\\MySQL\\MySQL Server 5.0\\bin\\mysqldump.exe" --user root --password=shorewaredba --databases shorewarecdr --routines --single-transaction>"C:\\shorewaredump1.sql"

      Once I figured out the password syntax, it has worked great for me. Each day's backup overwrites the previous day's automatically, which is what I wanted.


      • #4
        Thank you, ceverett. I tried your backup script and it worked like a charm. We have been doing the backup for the ST server through EVault but not sure if the DB is backed up properly. I raised this backup concern a while ago on another thread but got no response. Thank you for sharing the backup info.


        • #5
          Originally posted by cburgy View Post
          You'll want to make a copy of the Shoreline Data directory and run a backup of the mysql database via the database dump command.

          Exactly the Shoreline Data Folder and all its children folders are the heart of the server.

          Do this for your HQ and DVM's in a catastrophic failure you will have a fully operation system in a short period of time.

          One other note, if you have custom prompts make sure your backing those up as well or safe guarding the orignals

          MySQL website has a free administration tool. you can use that to automat SQL backups MySQL :: MySQL Administrator

          As with the script descirbed as well, you can use Windows Task Scheduler to automate the back ups
          Last edited by Jlorenz; 07-17-2008, 06:02 PM.


          • #6
            is it safe to install the backup exec agent on the shoretel server?


            • #7
              Originally posted by abuthemagician View Post
              is it safe to install the backup exec agent on the shoretel server?
              Yes, we have done it numerous times.


              • #8

                Did you install backupexec agent with open file option? does it work ok?

                Becouse I am having some log file in Shoreline data which can't be backuped.

                Also do i need to backup folder C:\Programm Files\Shoreline communications?

                thank you


                • #9
                  Yes, with the open file option. You'll have to check your open file options in BE, as there are a few technologies to accomplish this.

                  You only need to backup Shoreline Data. Make sure you are doing a MySQL backup first if you are running 8.X (or 7.X and want CDR backups).


                  • #10
                    any reason nobody is mentioning or backing up second database named “shoreware” ? – as I understand it’s configuration database….

                    thank you


                    • #11
                      That is because all you have to do to get that database backuped up is to simply copy it and then to restore it and put it back where it belongs. (in order to put it back you need to have shoreware services and the Shoreware Component stopped)

                      What I have done for our backup\restore is:


                      1. Copy the "Shoreline Data" folder
                      -we do this every night and copy it to a DR site, ours is about 10 GB and there is some file copy errors because shoretel is running and has some things locked yet. (it is probably not necessary to copy the whole directory but I didnt feel like finding what exactly was needed.)

                      2. Run the dump1.bat file
                      -we also do this dump nightly and copy this dump file to our DR site with the other directory
                      -file located at: C:\Program Files\Shoreline Communications\ShoreWare Server\MySQL\MySQL Server 5.0\Examples


                      (I am assuming you are rebuilding a new server from scratch, you have the Shoreware Server software installed and just need to import the databases)

                      1. Stop Services
                      - "MySQL"
                      -All Shoreware Services

                      2. Shutdown the shoreware Component
                      - this is located at
                      -Administrative tools >> Component Services >> Console root >> Component Services >> Computers >> My Computer >> COM+ Applications >> "ShoreWare"

                      3. Replace the "Shoreline Data" Folder with the backup copy made each night

                      4. Start "MySQL" Services

                      5. Run the restore1.bat
                      - located at: C:\Program Files\Shoreline Communications\ShoreWare Server\MySQL\MySQL Server 5.0\Examples

                      6. Start all Shoreware Services



                      • #12
                        I don't recommend following w131jrd's advice. Be careful with filesystem copies of the database files - MySQL server is likely to crash when you try to copy the files. I have a customer's server admin who refuses to disable the Backup Exec agent on their HQ server and I can see MySQL server crashing constantly (3 times for every run of the agent).

                        Crashing MySQL server may eventually cause a database corruption. If you don't restore immediately from the last good backup (which won't have any point-in-time changes since it was made since ShoreTel does NOT enable binary logging by default on the MySQL server), you will likely propagate the errors in subsequent backups if you are not managing generations of copies. Without the binary logs, you will lose all changes since the last good back.

                        Also, restore1.bat only handles the ShoreWareCDR database and not the configuration database.


                        • #13
                          When I copy the directory "Shoreline Data" my intention is not to backup the MySQL database it is to get a copy of the Config database and any other data that I would like to keep inside of the directory. The only think I am not worried about in the copy of that folder is the MySQL database and the file copy does fail copying those files.

                          We had a similar issue with the Backupexec agent crashing the MySQL service so we quit using it. We were afraid that copying that directory might crash the MySQL service as well but it does not. It simply fails the copy process. We are doing a mysql dump each night and using that dump file to restore the MySQL database in our restore procedure.

                          I have been running these scheduled jobs of copying data and doing SQL dumps from since about the same time this thread was created and we have had no problems with it affecting our production system. I have also tested my restore process in a staging environment several times and 1 time in production and both the config database and MySQL databases restored just fine.

                          I guess it wouldn't hurt if you excluded the MySQL database files in the "Shoreline Data" to avoid crashing the MySQL service I just found it easier to copy the whole directory and be done since it isn't causing us problems.


                          • #14
                            I just exclude those three files from backupexec job: ibdata1, ib_logfile0, ib_logfile1 according to shoretel admin guide

                            Still getting error on two log files: acc-090306.110428.log, EventWatch-090218.110109.log when back it up

                            Hopefully I do not need them to restore


                            • #15
                              has anyone tried to create a batch file that does NOT overwrite the previous backup by inserting the date/time into the output file name?

                              I can't tell if the problem is that I'm not great at scripting (meaning my script is wrong) or if MySQL can't be scripted the same way.

                              cd "C:\Program Files\Shoreline Communications\ShoreWare Server\MySQL\MySQL Server 5.0\bin"

                              mysqldump.exe --add-drop-table --routines --user=root --password=shorewaredba --database shoreware>C:\\shoreware.sql"

                              works just fine.

                              It would be nice to be able to go back to a specific point in time to find out what something looked like before it stopped working.

                              thoughts, comments suggestions welcome.

                              Ideally, I'd like something that does the following
                              @ECHO OFF
                              FOR /F "TOKENS=2-4 DELIMS=/ " %%a IN ("%date%") DO SET dd=%%a&SET mm=%%b&SET yy=%%c
                              FOR /F "TOKENS=1-3 DELIMS=:." %%a IN ("%time%") DO SET hh=%%a&SET tt=%%b&SET ss=%%c
                              MD "%yy%-%mm%-%dd% %hh%h%tt%m%ss%"

                              cd "C:\Program Files\Shoreline Communications\ShoreWare Server\MySQL\MySQL Server 5.0\bin"

                              mysqldump.exe --add-drop-table --routines --user=root --password=shorewaredba --database shoreware>C:\\shoreware_%date%_%time%.sql"
                              however, this script just creates an empty folder on the desktop named with the date & time the .bat was run.