Explains how to backup the Wonderware Historian (Previously called InSQL), by backing up the Runtime database and the History Blocks.
- Author: Dillon Perera
- Published: 05/29/2015
- Applies to: Wonderware Historian/InSQL 9.0 and higher
The Historian works by storing data in two main locations:
- Runtime Database: This database is used to store all of the configuration information for the Historian, such as the tag configuration, and where the data sources are located. This database also stores a small amount of historical information such as when events have occurred.
The Runtime database is only updated when tag configurations change, or an event occurs. As such, it typically change infrequently, and backups could likely be done on a weekly or monthly basis.
- History Blocks: These are files on the hard drive which store the actual historical information that the Historian has saved for later retrieval.
The History Blocks store new historical information daily, but when new data is received only the current History Block for the day is updated. As such, you would need to backup all history blocks once, but after that only the current history block will change. After all history blocks are backed up the first time, you could schedule a backup of any changed or new History Blocks to occur either on a daily or weekly basis.
Backup Procedures - Runtime Database:
The Runtime database is a Microsoft SQL database that holds configuration information for the Historian.
(The steps below are done using Microsoft SQL Server 2012, but will be similar for all versions of SQL Server.)
- Launch SQL Server's Console by going to Start > Programs > Microsoft SQL Server > SQL Server Management Console.
- Login to SQL Server. If you are unsure of your login you can use the user "wwAdmin" with password "wwAdmin".
- On the left of the screen a tree will be shown. Expand the top branch which should be your server's name, then expand the Databases folder and find the Runtime database.
- Right-click on the Runtime database and go to Tasks > Backup.
- A window will be displayed allowing you to customize how the backup will be done. The last settings that were used will be shown, but these can be customized:
- The Backup Type should be set to Full. This will ensure all information in the database is saved, not just the recent changes.
- You can enter a name for your backup. It is typically helpful to include the date the backup was created on the name of the file.
- The Destination can be changed using the Add and Remove options, these options will determine where the file will be saved. It is typically helpful to include the date the backup was created on the name of the file.
Backup Procedures - Runtime Database configuration only:
The Runtime database contains all of the configuration information of the tags in the Historian, but also contains a small amount of historical data. If you are only concerned with backing up the tag configuration, you can export this data to a text file. Note: As this procedure only contains some of the information contained within the Runtime database, it should not be used as a substitute for a full database backup.
- Go to Start > Programs> Wonderware > Historian > Database configration export and import.
- Select the first option, to Export to a text file, then click next.
- The options for the export will be shown:
- The Server name and authentication information will need to be entered for connecting to the Historian. If you are unsure of login credentials, the username "wwAdmin" with password "wwAdmin" can be used.
- Enter the location and filename of where the configuration file should be saved. It is typically helpful to include the date the backup was created on the name of the file.
- The Export all objects option will export all configuration information that is in the Runtime database. If you only want to export specific information you can unselect this option, and the next screen will provide options to customize this.
- Click Next.
- A window will be shown allowing you to confirm your selections. Hit Finish if you are ready to proceed.
- The export will begin. When finished your file will contain all of your tag information. If any errors occurred they will be listed in the log file that was created.
Backup Procedures - History Blocks:
The history blocks are files the Historian uses to store the actual historical data. These files will be stored to the hard drive.
- Determine where the History Blocks are stored on your system. By default these will be stored to either C:\InSQL, or C:\Historian, but this setting can be updated.
- Open the Wonderware System Management Console (SMC) by going to Start > Programs > Wonderware > System Management Console.
- Expand out the Historian branch > Historian Group > SERVERNAME > Configuration Editor > System Configuration > Storage > Storage Locations.
- Once you click on Storage Locations the defined storage locations will be shown on the right side of the screen. These are the locations that will need to be backed up.
Note: Any storage locations starting with "rr:\" are not in use and can be ignored.
- Go to the locations of the History Blocks as determined in step 1 by using Windows Explorer.
- The history blocks are normal files on the hard drive. To back them up just copy them to a safe location, such as an external hard drive.