Store SmarterTrack Data Files on an Alternate Drive or SAN

By default, SmarterTrack is configured to save data to the database and to a sub-folder of the website called App_Data. Some users may wish to configure SmarterTrack so that it saves data into a separate directory, a different directory on the drive, a completely different hard drive, or a NAS/SAN/iSCSI device. NOTE: Making such changes will alter the normal backup and restore procedures and may change the way other SmarterTrack KB articles and help files are interpreted. Please ensure that you the read the SmarterTrack release notes before installing new versions. This will allow you to determine if any adjustments to these steps are necessary.

During this process, it is recommended that the application pool under which SmarterTrack runs be stopped. It is also strongly encouraged that you back up your existing installation and database before attempting this procedure.

In the steps that follow, replace [DIRECTORY] with the full machine-accessible path to your alternate drive, SAN, or NAS. For example, if I wanted my data stored on E:\SmarterTrack, I would use E:\SmarterTrack instead of [DIRECTORY] in the example below.

An overview of the instructions are:

  1. Create the required directories.
  2. Copy the required files.
  3. Create the mapping file.
  4. Set permissions.
  5. Edit the web.config file.

Create the Required Directories
Follow these steps to create the required directories:

  1. Create the primary data directory that you reference with [DIRECTORY].
  2. Create the following sub-folders under it:
    • App_Data
    • App_Data\Attachments
    • App_Data\Avatars
    • App_Data\Config
    • App_Data\Config\Events
    • App_Data\Dictionaries
    • App_Data\Logs
    • App_Data\RawContent
    • App_Data\Spool
    • App_Data\Temp
    • App_Data\UserResources
    • App_Data\UserResources\Common
    • GeoIP
    • Dictionaries

Copy the Required Files
NOTE: If you are modifying an existing install, copy all files from your old App_Data folder to [DIRECTORY]\App_Data. For new installs and existing installs, copy the files from the installation image as shown below:

App_Data/Dictionaries -> [DIRECTORY]\Dictionaries App_Data/Config/GeoIP*.* -> [DIRECTORY]\GeoIP\*.* App_Data/Avatars -> [DIRECTORY]\App_Data\Avatars\*.*

Create the Mapping File (SiteDetails.xml)
Using Notepad, create a file named SiteDetails.xml in [DIRECTORY]. Make sure that you do not accidentally save the file as SiteDetails.xml.txt.

The SiteDetails.xml file is a file that you can create using NotePad. It defines the mappings between sites and application data locations. A typical siteDetails.xml file looks like this:

<?xml version="1.0" encoding="utf-8"?> <Sites>     <Site id="1" product="SmarterTrack4">         <Binding hostheader="support.mydomain.com" port="80" />         <Binding hostheader="mydomain.com" port="80" />         <Directory location="[DIRECTORY]\App_Data" name="UserData" />         <Directory location="[DIRECTORY]\GeoIP" name="GeoIP" />         <Directory location="[DIRECTORY]\Dictionaries" name="Dictionaries" />     </Site> </Sites>

The binding entries are used to configure any host headers or domain names you use. It is with this information that SmarterTrack knows which site is being accessed. Every host header used must be added to this file. If you use an IP address to access the SmarterTrack site, that should be added as a binding as well.

The directory entries are used to configure where data files are located.


Set Permissions
The directory [DIRECTORY] must allow full control from the user configured in IIS for SmarterTrack. Usually this will be the "Network Service" user, but if you are going to access the files across a domain (a share, for instance), a domain account dedicated to the purpose may be necessary.

Edit the Web.config File
Follow these steps to edit the web.config file:

  1. In the SmarterTrack web site folder, open web.config using Notepad, and find the section '<appSettings>'.
  2. Within that section, add the following line, replacing [DIRECTORY] with your data path:
<add key="DynamicConfigurationFile" value="[DIRECTORY]\SiteDetails.xml"></add>

Changing the web.config file will restart the site, and it should be using the new configuration details. Load the site and ensure that it operates correctly.

 

Learn more about SmarterTrack’s live chat, self service portal and knowledge base software.