If you have created a backup of the EVS
server, follow these steps to restore it.
To perform the restore itself, you can either use the Windows command line or use the
MySQL workbench.
-
Stop the EVS service.
-
If you have enabled incremental logging:
-
Restart the MySQL service.
-
Execute the command mysqladmin flush-logs.
-
To perform the restore from the Windows command line:
-
Open a Command Prompt window.
-
Run the command %MYSQL_HOME%\mysql -u root -v.
-
When prompted for a password, provide the password for the root user. The default password is
vocera.
-
Type the command \. path, where path
is the path to the desired backup file.
-
To perform the restore from the MySQL workbench:
-
Open the MySQL workbench. This is included with
EVS.
-
Connect to the EVS
database (localhost:3306).
-
Use Open SQL Script to open the backup file
(or type Ctrl+Shift+O).
-
Run the SQL script.
-
To optionally perform an incremental restore:
-
On the drive on which you have installed
EVS,
go to the evs\backup folder.
-
Locate all files with prefix evs-bin. whose date is newer than the time of the
error or reinstall. Copy these files to a temporary directory.
-
Run the batch script evs-restore-incremental.bat, passing the location of the
temporary directory as its argument. For example, if you have copied files to the
C:\vocera\temp\recover folder, run the following command:
evs-restore-incremental.bat C:\vocera\temp\recover
-
If the most recent of your incremental recovery files contains transactions that you want to exclude
from the start or end, you can modify the restore command in the
evs-restore-incremental.bat file to include either of the following:
- --start-datetime=datetime: Exclude transactions before the time
specified in datetime.
- --stop-datetime=datetime: Exclude transactions after the time specified in
datetime.
For example, to restore transactions prior to 9:00 on April 1, 2017 only, edit the
evs-restore-incremental.bat file. Change the line
for %%i in (".\evs-bin*") do (%MYSQL_HOME%\bin\mysqlbinlog %%i --database=evs >> recovery.sql)
to
for %%i in (".\evs-bin*") do (%MYSQL_HOME%\bin\mysqlbinlog %%i --stop-datetime="2017-04-01 09:00:00" --database=evs >> recovery.sql)
-
Start the EVS service.