How to Back Up and Restore the System Configuration

You are here:
< Back

About backup and restore of configuration

Milestone recommends that you make regular backups of your system configuration (cameras, schedules, views, and so on) as a disaster recovery measure.

While it is rare to lose your configuration, it can happen under unfortunate circumstances. Luckily, it takes only a minute to back up your existing configuration.

Back up system configuration

In the following, Milestone assumes that you have not changed your system’s default configuration path, which is C:\Program Data\Milestone\Milestone Surveillance on servers running all supported operating systems. If you have changed the default configuration path, you must take your changes into consideration when using the method described in the following.

The backup described here is a backup of your entire surveillance system setup including log files, event configuration, restore points, view groups as well as Management Application and XProtect Smart Client configuration. Alternatively, you can export your configuration as a backup, which is limited to the Management Application configuration.

To back up:

  1. Make a copy of the folder C:\Program Data\Milestone\Milestone Surveillance and all of its content.
  2. Open the folder C:\Program Files\Milestone\Milestone Surveillance\devices, and verify if the file devices.ini exists. If the file exists, make a copy of it. The file exists if you have configured video properties for certain types of cameras. For such cameras, changes to the properties are stored in the file rather than on the camera itself.
  3. Store the copies away from the server, so that they are not affected if the server is damaged, stolen or otherwise affected.

Remember that a backup is a snapshot of your system configuration at the time of backing up. If you later change your configuration, your backup does not reflect the most recent changes. Therefore, back up your system configuration regularly. When you back up your configuration as described, the backup includes restore points. This allows you to not only restore the backed-up configuration, but also to revert to an earlier point in that configuration if you need to.

Restore system configuration

  1. If you use the system on a server running any supported operating system, copy the content of the backed-up Milestone Surveillance folder into C:\Program Data\Milestone\Milestone Surveillance.
  2. If you backed up the file devices.ini, copy the file into C:\Program Files\Milestone\Milestone Surveillance\devices.

Back up and restore alarm and map configuration

Available functionality depends on the system you are using. See the Product comparison chart for more information.

It is important that you regularly back up your alarm and map configurations. You do this by backing up the event server, which handles your alarm and map configuration as well as the Microsoft® SQL Server Express database, which stores your alarm data. This enables you to restore your alarm and map configuration in a possible disaster recovery scenario. Backing up also has the added benefit that it flushes the SQL Server Express database’s transaction log.

When you back up and restore alarm and/or map configuration, you must do it in the following order:

Requirements

  • You must have administrator rights on the SQL Server Express database when you back up or restore your alarm configuration database on the SQL Server Express. Once you are done backing up or restoring, you only need to be a database owner of the SQL Server Express database.
  • Microsoft® SQL Server Management Studio Express, a tool you can download for free from the Microsoft website. Among its many features for managing SQL Server Express databases are some easy-to-use backup and restoration features. Download and install the tool on your existing surveillance system server and on a possible future surveillance system server (you need it for backup as well as restoration).

Step 1: Stop the Event Server service

Stop the event server service to prevent configuration changes from being made:

  1. On your surveillance system server, click Start > Control Panel > Administrative Tools > Services.
  2. Right-click the Event Server, click Stop.

This is important since any changes made to alarm configurations—between the time you create a backup and the time you restore it—are lost. If you make changes after the backup, you must make a new backup. Note that the system does not generate alarms while the Event Server service is stopped. It is important that you remember to start the service again once you have finished backing up the SQL database.

Step 2: Back up alarms data in SQL Server Express database

If you do not have SQL Server Management Studio Express, you can download it for free from the Microsoft website.

  1. Open Microsoft SQL Server Management Studio Express from Windows’ Start menu by selecting All Programs > Microsoft SQL Server 2008 > SQL Server Management Studio Express.
  2. When you open the tool, you are prompted to connect to a server. Specify the name of the required SQL Server and connect with administrator user credentials. You do not have to type the name of the SQL server: if you click inside the Server name field and select <Browse for more…>, you can select the SQL Server from a list instead.
  3. Once connected, you see a tree structure in the Object Explorer in the left part of the window. Expand the SQL Server item, then the Databases item, which contains your entire alarm configuration.
  4. Right-click the VIDEOOSDB database, and select Tasks > Back Up…
  5. On the Back Up Database dialog’s General page, do the following:
    • Under Source verify that the selected database is VIDEOOSDB and that the backup type is Full.
    • Under Destination A destination path for the backup is automatically suggested. Verify that the path is satisfactory. If not, remove the suggested path, and add another path of your choice.
  6. On the Back Up Database dialog’s Options page, under Reliability, select Verify backup when finished and Perform checksum before writing to media.
  7. Click OK to begin the backup. When backup is finished, you see a confirmation.
  8. Exit Microsoft SQL Server Management Studio Express.

Step 3: Reinstall your system

Do not install your surveillance software on a mounted drive. A mounted drive is a drive that is attached to an empty folder on an NTFS (NT File System) volume, with a label or name instead of a drive letter. If you use mounted drives, critical system features may not work as intended. You do not, for example, receive any warnings if the system runs out of disk space.

Before you start: Shut down any existing surveillance software.

  1. Run the installation file. Depending on your security settings, you may receive one or more security warnings. Click the Run button if you receive a warning.
  2. When the installation wizard starts, select language for the installer and then click Continue.
  3. Select if you want to install a trial version of your system or indicate the location of your software license file.
  4. Read and accept the license agreement, and indicate if you want to participate in the Milestone data collection program.
  5. Select Typical or Custom installation. If you select Custom installation, you can select application language, which features to install and where to install them. Let the installation wizard complete.

You can now begin to configure your system, see Configure your system in Management Application.

Step 4: Restore alarms data in SQL Server Express database

Luckily, most users never need to restore their backed-up alarm data, but if you ever need to, do the following:

  1. In the Windows Start menu, open Microsoft SQL Server Management Studio Express.
  2. Connect to a server. Specify the name of the required SQL Server, and connect using the user account the database was created with.
  3. In the Object Explorer on the left, expand SQL Server > Databases, right-click the VIDEOOSDB database, and then select Tasks > Restore > Database…
  4. In the Restore Database dialog, on the General page, under Source for restore, select From device and click <Browse for more…>, to the right of the field. In theSpecify Backup dialog, make sure thatFileis selected in the Backup media list. Click Add.
  5. In the Locate Backup File dialog, locate and select your backup file VIDEOOSDB.bak. Then click OK. The path to your backup file is now listed in the Specify Backup dialog.
  6. Back on the Restore Database dialog’s General page, your backup is now listed under Select the backup sets to restore. Make sure you select the backup by selecting the check box in the Restore column.
  7. Now go to the Restore Database dialog’s Options page, and select Overwrite the existing database. Leave the other options as they are, and then click OK to begin the restoration. When the restore is finished, you see a confirmation.
  8. Exit Microsoft SQL Server Management Studio Express.

Note: If you get an error message telling you that the database is in use, try exiting Microsoft SQL Server Management Studio Express completely, then repeat steps 1-8.

Step 5: Restart the Event Server service

During the restore process, the Event Server service is stopped to prevent configuration changes being made until you are done. Remember to start the service again:

  1. On your surveillance system server, click Start > Control Panel > Administrative Tools > Services.
  2. Right-click the Event Server, click Start.

About the SQL Server Express transaction log and reasons for flushing it

Each time a change in the system’s alarm data take place, the SQL Server logs the change in its transaction log. The transaction log is essentially a security feature that makes it possible to roll back and undo changes to the SQL Server Express database. The SQL Server by default stores its transaction log indefinitely, and, therefore, the transaction log builds up more and more entries over time.

The SQL Server’s transaction log is by default located on the system drive, and if the transaction log just keeps growing, it may in the end prevent Windows from running properly. Flushing the SQL Server’s transaction log from time to time is therefore a good idea, however flushing it does not in itself make the transaction log file smaller, rather it prevents it from growing out of control. Your system does not, however, automatically flush the SQL Server’s transaction log at specific intervals. This is because users have different needs. Some want to be able to undo changes for a very long time, others do not care.

You can do several things on the SQL Server itself to keep the size of the transaction log down, including truncating and/or shrinking the transaction log (for numerous articles on this topic, go to support.microsoft.com and search for SQL Server transaction log). However, backing up the system’s database is generally a better option since it flushes the SQL Server’s transaction log and gives you the security of being able to restore your system’s alarm data in case something unexpected happens.

Export and import Management Application configuration

You can export the current configuration of your Management Application, either as a safety measure in order to have a backup file of your configuration, or as a clone allowing you to use a similar Management Application configuration elsewhere. You can, at a later time, import previously exported Management ApplicationManagement Application configurations.

Export Management Application configuration as backup

With this option, all relevant Management Application configuration files are combined into one single .xml file, which you can specify a location for. Note that if there are unsaved changes to your configuration, these are automatically saved when you export the configuration.

  1. In the File menu, select Export Configuration – Backup.
  2. Browse to the location at which you want to store the exported configuration, specify a suitable file name, and click Save.

If you intend to set up an identical version of your surveillance system elsewhere, do not export your configuration as backup, since this may lead to the same device information being used twice, in which case clients may get the following error message: Application is not able to start because two (or more) cameras are using the same name or ID. Instead, export your configuration as a clone. When you export as a clone, the export takes into account the fact that you are not using the exact same physical cameras, etc. even though your new system may otherwise be identical to your existing one.

Note that there is a difference between this Management Application configuration backup and the system configuration backup done from the Milestone Surveillance folder because these are two different things. The backup described here is limited to a backup of the Management Application configuration. The type of system configuration backup done from the Milestone Surveillance folder is a backup of your entire surveillance system setup (including, among other things, log files, event configuration, restore points, view groups as well as the Management Application and XProtect Smart Client configuration).

Export Management Application configuration as clone

With this option, all relevant Management Application configuration files are collected, and GUIDs (Globally Unique IDentifiers, unique 128-bit numbers used for identifying individual system components, such as cameras) are marked for later replacement. GUIDs are marked for later replacement because they refer to specific components (cameras and so on). Even though you wish to use the cloned configuration for setting up a new similar system using similar types of cameras, the new system does not use the exact same physical cameras as the cloned system. When you use the cloned configuration later in a new system, the GUIDs are replaced with GUIDs representing the specific components of the new system.

After you have marked GUIDs for replacement, the configuration files are combined into one single .xml file, which you can then save at a location specified by you. Note that if there are unsaved changes to your configuration, they are automatically saved when you export the configuration.

  1. In the File menu, select Export Configuration – Clone.
  2. Browse to the location at which you want to store the exported configuration, specify a suitable file name, and click Save.

Import previously exported Management Application configuration

The same import method is used regardless of whether the Management Application configuration was exported as a backup or a clone.

  1. In the File menu, select Import Configuration.
  2. Browse to the location from which you want to import the configuration, select the relevant configuration file, and click Open.
  3. Only relevant if the system into which you import the configuration contains devices (cameras, etc.) which are not present in the imported configuration: you are asked whether you want to delete or keep recordings from affected devices. If you want to keep the recordings, note that they are not accessible until you add the affected devices to the system again. Select the option you need, and click OK.
  4. Expand Advanced Configuration > Services.
  5. For the Recording Server and Image Server services respectively, click the Restart button. Restarting the two services applies the imported Management Application configuration.

Restore system configuration from a restore point

Restore points allow you to return to a previous configuration state. Each time you apply a configuration change in the Management Application, a new restore point is created.

All restore points in the current and previous five sessions are stored and can be selected again. A new session begins each time you start the Management Application as well as each time you save the whole configuration. For sessions older than the last five sessions, only the latest restore point of each session is stored. With the Number of old sessions to keep field, you can control how many old sessions are kept.

When you select to restore a configuration from a restore point, the configuration from the selected restore point is applied and used once the services are restarted.

If you have added new cameras or other devices to the system after the restore point was created, they are missing if you load the restore point. This is because they were not in the system when the restore point was created. In such cases, you are notified and must decide what to do with recordings from the affected devices.

  1. From the File menu, select Load Configuration from Restore Point…
  2. In the left part of the Restore Points dialog, select the relevant restore point.
  3. Click the Load Restore Point button.
  4. If you are sure that you want to overwrite the current configuration with the one from the selected restore point, click OK.
  5. Only relevant if the current configuration contains cameras or other devices which were not present in the selected restore point: you are asked whether you want to delete or keep recordings from affected devices. If you keep the recordings, note that you cannot access them until you add the affected devices to your system again. Select the relevant option, and click OK.
  6. Click OK in the Restore Points dialog.
  7. Expand Advanced Configuration, and select Services.
  8. For the Recording Server and Image Server services respectively, click the Restart button. When the two services are restarted, the configuration from the selected restore point is applied.

Note: When you select a restore point, you can see information about the configuration state at the selected point in time in the right part of the dialog. This can help you select the best possible restore point.