SmartAuditor Database Maintenance - How to Archive and Restore Session Recordings

Added by Jennifer Lang , last edited by Jennifer Lang on May 20, 2008
Tags: 

This document provides information about database maintenance for archiving and restoring session recording files using the Citrix SmartAuditor database utility, ICLDB. The main function of the SmartAuditor database is cataloguing session recording files for the purposes of searching and locating files. The storage and retrieval of session recording files is maintained by the SmartAuditor Server.

At periodic intervals, session recording files will need to be archived to an alternative storage location or media to maintain an adequate level of spare disk capacity in the SmartAuditor storage locations. Restoring session recording files is available using the ICLDB utility or copying files into the SmartAuditor Restore directory for archived files.

ICLDB Utility

The ICLDB utility is a database command-line utility that is used to manipulate the session recording records in the Citrix SmartAuditor Database. The ICLDB utility is installed onto the SmartAuditor Server in the drive:\ProgramFiles\Citrix\SmartAuditor\Server\Bin directory. This utility provides the following commands:

  • Archive - Archives session recording database records in the Citrix SmartAuditor Database and allows archived session recording files to be moved to another location.
  • Dormant - Displays the number of dormant session recordings.
  • Import - Creates or updates session recording database records in the Citrix SmartAuditor Database from session recording files.
  • Locate - Displays and verifies the physical location of a session recording file.
  • Remove - Removes session recording records from the Citrix SmartAuditor Database and optionally allows session recording files to be deleted from the storage location.
  • Removeall - Removes all session recording database records from the Citrix SmartAuditor Database, and returns the database back to its original state. This does not remove or change any policies in the database.
  • Version - Displays the schema version of the Citrix SmartAuditor Database.

The ICLDB utility is easily scripted by using the force command-line switch /F, to run a command without prompting. The /L command-line switch can be used to log results and errors to the Windows Application event log.

The archiving and restoring of session recordings utilizes the archive and import commands of the ICLDB utility. The /? Command-line switch can be used to access the help for the ICLDB utility, at the command prompt type icldb /?. To access help for specific commands type icldb <command> /?.

Archiving Session Recording Files

Archiving of session recording files should be performed regularly to maintain an adequate level of spare disk capacity in the SmartAuditor storage locations. Depending upon the amount of disk space available and the typical size of session recording files, the interval at which archiving occurs will differ. Note that session recording files must be older than two days from the start date before a session recording file can be archived. This is to prevent any live recordings from being archived before they become complete.

Two methods are available when archiving session recordings. The SmartAuditor database record for a session recording file may be updated to have a status of archived while the session recording file remains in the SmartAuditor storage location. This can be used to reduce the search results in the Player. The other method is to update the database record for a session recording file to the status of archived and move the session recording file from the SmartAuditor storage location to another location for backup to alternative media. When the ICLDB utility moves session recording files from the SmartAuditor storage location, the files are simply moved into the directory specified, the storage location date file structure of year\month\day will be removed.

The session recording record in the SmartAuditor Database contains two fields associated with archiving: the archived time representing the current date and time a session recording was archived and archive note, an optional text note that may be added by the administrator during archiving. These fields indicate a session recording has been archived and the time of archival.

In the SmartAuditor Player, any archived session recordings will show a status of Archived, as well as the date and time of archive. Session recordings which have been archived may still be played if the files have not been moved. If a session recording file was moved during archive, a file not found error is displayed. The session recording file must first be restored before the session can be played. To restore a session recording provide the administrator with the File ID and Archive Time of the session recording from the SmartAuditor Player session recording Properties dialog. Restoring archived files is discussed further in the Restoring Session Recording Files section below.

The archive command of the ICLDB utility has several parameters. These are explained below:

  • /RETENTION:<days> - The retention period in days for session recordings. Recordings older than the number of days specified will be marked as archived in the SmartAuditor Database. The retention period must be an integer number greater than or equal to 2 days.
  • /LISTFILES - Lists the full path and filename of session recording files as they are being archived. This is an optional parameter
  • /MOVETO:<directory> - The directory to physically move archived session recording files to. The specified directory must exist. This is an optional parameter and if omitted, files will remain in their original storage location.
  • /NOTE:<note> - A text note that is added to the database record for each session recording archived. Ensure the note is enclosed with double quotes. This is an optional parameter
  • /L - Log the results and errors to the Windows Application event log of the number of session recording files archived. This is an optional parameter
  • /F - Force the archive command to run without prompting. This is an optional parameter.

To archive session recordings in the SmartAuditor Database and physically move session recording files

  1. Log on to the server that hosts the SmartAuditor Server as an administrator.
  2. From the Start menu, choose Start > All Programs > Accessories > Command Prompt.
  3. At the Command Prompt change from the current working directory to the SmartAuditor Server Bin directory (drive:\Program Files\Citrix\SmartAuditor\Server\Bin).
  4. Execute the command ICLDB ARCHIVE /RETENTION:<days> /LISTFILES /MOVETO:<directory> /NOTE:<note> /L where days is the retention period for session recording files, directory is the directory where archived session recording files will be moved to and note is the text note that is added to the database record for each session recording file being archived. Enter Y to confirm the archive.

To only archive session recordings in the SmartAuditor Database

  1. Log on to the server that hosts the SmartAuditor Server as an administrator.
  2. From the Start menu, choose Start > All Programs > Accessories > Command Prompt.
  3. At the Command Prompt change from the current working directory to the SmartAuditor Server Bin directory (drive:\Program Files\Citrix\SmartAuditor\Server\Bin).
  4. Execute the command ICLDB ARCHIVE /RETENTION:<days> /LISTFILES /NOTE:<note> /L where days is the retention period for session recordings and note is the text note that is added to the database record for each session recording being archived. Enter Y to confirm the archive.

Restoring Session Recording Files

Restoration of session recording files is required when you wish to view a session recording that was archived in the SmartAuditor Database and the file has been moved from the SmartAuditor storage location. Archived session recordings that were not moved from the SmartAuditor storage location during archiving are still accessible in the SmartAuditor Player.

Two methods are available for restoring session recording files that have been moved. The administrator may simply copy the required session recording file into the Restore directory for archived files, or import the required session recording file back into the SmartAuditor Database using the ICLDB utility. Citrix recommends the first method for restoring archived session recording files. Any archived files copied into the Restore directory for archived files should be removed when no longer needed.

The SmartAuditor Broker utilizes the Restore directory for archived files when a session recording file is not found in its original storage location. This occurs when the SmartAuditor Player requests a session recording file for playback. The SmartAuditor Broker will first attempt to find the session recording file in the original storage location. If the file is not found in the original storage location, the SmartAuditor Broker then checks the Restore directory for archived files. If the file is present in the restore directory, the SmartAuditor Broker sends the file to the SmartAuditor Player for playback. Otherwise, if the file is not found, the SmartAuditor Broker sends a file not found error to the SmartAuditor Player.
Importing archived session recording files using the ICLDB utility updates the SmartAuditor Database with session recording information from the session recording file, including a new storage path for the session recording file. Using the ICLDB utility to import an archived session recording file does not move the file back to the original storage location when the session was recorded.

Note: An imported session recording file will have the archive time and archive note in the SmartAuditor Database cleared. Therefore, the next time the ICLDB archive command is run, the imported session recording file may become archived again.

The ICLDB import command is useful to import a large number of archived session recording files, repair or update incorrect and missing session recording data in the SmartAuditor Database, or move session recording files from one SmartAuditor Server storage location to another SmartAuditor Server storage location. The ICLDB import command may also be used to repopulate the SmartAuditor Database with session recordings after executing the ICLDB removeall command.

The import command of the ICLDB utility has several parameters. These are explained below:

  • /LISTFILES - Lists the full path and filename of session recording files as they are being imported. This is an optional parameter
  • /RECURSIVE - Searches all sub-directories for session recording files. This is an optional parameter.
  • /L - Log the results and errors to the Windows Application event log the number of session recording files imported. This is an optional parameter
  • /F - Force the import command to run without prompting. This is an optional parameter.

To restore session recording files using the Restore Directory for Archived Files

  1. Log on to the server that hosts the SmartAuditor Server as an administrator.
  2. Using the SmartAuditor Player Properties, determine the File ID and _Archive Time _of the archived session recording file.
  3. Locate the session recording file in your backups using the File ID specified in the SmartAuditor Player Properties. Session recordings have a filename of i_<FileID>.icl, where FileID is the ID of the session recording file.
  4. Copy the session recording file from your backup into the Restore directory for archived files. To determine the Restore directory for archived files:
    • From the Start menu, choose Start > All Programs > Citrix > SmartAuditor > SmartAuditor Server Properties.
    • In the SmartAuditor Server Properties dialog box, click Storage tab. The current restore directory is listed in the Restore directory for archived files field.

Note: You may want change the restore directory for archived files to another directory. Refer to Citrix SmartAuditor for Presentation Server 4.5 for more information on configuring the restore directory for archived files.

To restore session recording files using the ICLDB import command

  1. Log on to the server that hosts the SmartAuditor Server as an administrator.
  2. From the Start menu, choose Start * > *All Programs > Accessories > Command Prompt.
  3. At the Command Prompt change from the current working directory to the SmartAuditor Server Bin directory (drive:\Program Files\Citrix\SmartAuditor\Server\Bin).
  4. Either:
    • Execute the command ICLDB IMPORT /LISTFILES /RECURSIVE /L <directory> where directory is the name of one or more directories, separated by a space containing session recording files. Enter Y to confirm the import.
    • Execute the command ICLDB IMPORT /LISTFILES /L <file> where file is the name of one or more session recording files, separated by a space. Wildcards may be used to specify session recording files. Enter Y to confirm the import.