Implementing a periodic backup schedule protects you from data loss and keeps a record of important sessions for future reference. Although backing up and removing session data on a daily basis is the ideal scenario, you should implement a backup plan that is appropriate for your production environment.
TLBackup can perform both full and incremental backups of canister data and configuration files. Depending on the volumes of data you are backing up, you may find it better to perform a partial backup instead of a full backup. A partial backup saves all canister data files that have not been previously archived.
Other parameters to consider:
- Frequency - The frequency at which you back up data depends on several factors: the number of interesting sessions you have chosen to archive, the amount of traffic your Web site has, and the number of sessions you can afford to lose. If you have a low tolerance for data loss, you should schedule backups every day. You can schedule Canister backups by creating a scheduled task.
- Retention - Determine the length of time you want to keep backup data.
- Location - In most cases, you should have a designated backup computer on which to store backups. You can install TLBackup on all Canister machines and specify to back up to the same remote backup machine.
Coordinating CanTrim and TLBackup in all-in-one environments
CanTrim deletes sessions from the Canister older than a specified number of days, while backup archives sessions at specified intervals.
- Specify a time for CanTrim to run that is later than TLBackup. If CanTrim runs before TLBackup, it could permanently delete sessions that you intend to archive.
- When TLBackup runs, it clears the archive attribute bit after it backs up LSSN data file. CanTrim checks to see if this bit is cleared. If it has not been cleared, then it does not run. This creates a potential situation where sessions will continue to grow in the Canister and consume more disk space if backup is not run regularly. If you are not running backup regularly and want to verify that sessions get deleted from the Short Term Canister, deselect the
Delete session data only after backup
checkbox in the Canister Configuration dialog box so CanTrim deletes sessions older than the number of days specified. - Full backup - Copies the entire base Canister to a specified TLBackup directory.
- Incremental backups - Only copies the
LSSN*.dat
andLSSN*.IDX
day data files to a specified TLBackup directory.
Configuring TLBackup
You can configure TLBackup by using the backup directory. Using the following steps you can specify the number of old backup folders to retain, the number of partial backup folders to retain, and how much additional free space to allot on the hard drive.
When TLBackup.exe
is run, it automatically creates and stores backed up data into subfolders named with the year, date, time, and a prefix of _FULL
or _PARTIAL
. Example: 200207291648_FULL
.
Configuration is accomplished in two basic steps:
- Configuring the parameters in
TLBackupCfg.xml
. These parameters are described below. - Scheduling when to run TLBackup.
- To Configure TLBackup, open <install_directory>/Tools/TLBackupCfg.xml.
- Modify the following configuration options:
Option Description Backup Directory
Specifies the name of the directory in which to store the Canister data files. This directory can be a remote host on the network. To specify the remote host, use the UNC path naming: \\BACKUPSERVER\directory
.Note: The specified backup directory on the remote server must be shared. The user under which the backup process is scheduled to run must have permissions to write to the designated backup server.Remove Old TLBackup Directories
When set to 1, this option removes old backup folders. The FullBackUpCount
setting specifies the number of backup folders to keep. This option works by timestamp, so only the most recent backup folders are kept.FullBackUpCount
Specifies the number of old backup folders to retain. BackupDaysToSave
Specifies the number of partial backup folders to retain. FreeDiskSpace
Specifies additional free space to allot on the hard drive beyond what is required by TLbackup.vbs
. - To run a single instance of TLBackup, open a command prompt.
- Navigate to the <install_directory>/Tools directory.
- Run
TLBackup.exe
:- You can run this manually at the command line.
- You can also set up a Windows™ task to run the script automatically at a specified interval. To run the script, run the
Tlbackup.exe -Partial
command.Note: For this process, you should perform a partial backup, which does perform a full backup of all canister data files that have not been previously archived.
- The following options are available through the command line or through the Windows Task Scheduler:
Option Description Full
Specifies to back up the base Canister. This includes the Master Session archive table ( LSSN
), Post Event/ Annotation table (PEVT
), Report tables (RF*.DAT
), Event and Category tables (NTYP
,NCTG
), corresponding .csv files, and Search Server registry files.Partial
Specifies to back up the incremental Canisters with the archive field value set. This backs up LSSN*.DAT
and corresponding .idx files,PEVT*.DAT
and corresponding .idx files.Cycleservices
Specifies to stop and restart Tealeaf services. Before stopping services, TLBackup verifies that sessions are drained from the Short Term Canister before proceeding with services shutdown. Upon services restart, TLBackup starts TLTMaint to perform an integrity check on the tables. Progress is logged to the console window.
Command-line options
In addition to backing up Tealeaf, TLBackup can be used to cycle services in the Tealeaf system. The exception is the Transport Service, which must remain available to spool data during the backup.
These options can also be configured through the XML configuration file for TLBackup.
You can execute backup and cycle services using the following commands at the command line.
Partial Backup
tlbackup -Partial
Full Backup
tlbackup -Full
Cycle All Services
tlbackup -Cycleservices
If a Tealeaf service is in a stopped state when TLBackup is run, TLBackup does not start the service. If you intentionally took a service down for maintenance or troubleshooting, then this behavior prevents an unwanted restart of that service.
To force a restart of all services after TLBackup runs, you can issue the following command. This command should be executed after TLBackup.exe completes, preferably as a second command in the same command-line script:
"<install_directory>\CanSvcs.exe" -start
When the above command is run, any running services are not affected, and any stopped services are started.
Use Alternate Configuration File
You can specify an alternate configuration file in the command, which enables you to perform different types of backups depending on the situation, without modifying a single config file between backup operations.
In the example command below, a full backup is performed using the alternate config file [cfgfile]
:
tlbackup -Full -Altcfg [cfgfile]
where:
[cfgfile]
is the full path to the alternate configuration file.
Command Line Help
tlbackup -?
Scheduling Canister backups
Use the Windows Scheduled task wizard to automate all backup tasks.
To schedule a daily full backup of the long term archive, complete the following steps:
- Open the Control Panel.
- Choose Scheduled Tasks.
- Double-click Add Scheduled Task to start the wizard.
- Click Next and browse to select the following file:
<install_directory>\Portal\Tools\TLbackup
- Complete the options in the wizard.
- In the Task tab in the Run field, enter the
-Partial
parameter after the path and TLBackup file name.Note: TLBackup must have a command-line parameter to initiate the backup process. - When prompted for the user and password to execute the task, enter a username that has full write permissions on the Canister and backup machines.
TLBackup checks on startup
TLBackup performs the following steps on startup.
- Retrieves time zone and calculates a day based on the time zone configured at install time.
- Derives Hostname of indexing computer from the Windows Registry if the Tealeaf CX Indexer is not on the same machine.
- Reads the
ctsrvr.cfg
files to get the location of the Tealeaf datastore. - Checks for available disk space.
- Stops services and run TLTMaint to check the integrity of the Canister. TLTMaint launches CanTrim, if it finds sessions older than the specified number of days.
- Performs backup operation. No data is lost during backup as incoming data is queued by the Extended Decoupler.
- Resets the archive bit.
- Removes old backup folders, if specified.
Restoring Tealeaf data from TLBackup
TLRestore
copies data files for the base canister and incremental day to the current canister directory.
When you perform a restoration of a Canister backup, all data stored in the Canister is lost and cannot be recovered.
RestoreCanister reads the TLBackupCfg.xml file to locate the backup directory and to determine the settings used for the original backup.
To Restore the Tealeaf CX Datastore:
- Open a command prompt and navigate to the following directory:
<install_directory>\Portal\Tools\TLbackup
- Open
TLRestore.exe
. - TLRestore runs through the following list of processes:
- RestoreCanister locates the Tealeaf directory.
- Rebuilds the Canister.
- RestoreCanister restores the base Canister.
Running TLRestore
TLRestore enables you to restore backup directories in the order of restoration, which allows you to rebuild your dataset through a series of Partial backups.
TLRestore first asks to perform a rebuild of the Canister, which removes all current data. When the canister is rebuilt, all backup directories are copied in the appropriate order to the Canister.dbs
directory.
When the restore is complete, you must restart the Tealeaf Services and perform a check-and-fix operation to rebuild the indexes.
To restore Canister data, perform the following steps:
- Run
<install_directory>\tools\TLRestore.exe
.- Rebuilds the canister, which deletes all current data in the canister.
- Restores all data listed in the backup directories in the order of restoration.
- Run a check-and-fix on the indexes to recreate them.
- Enter the following URL on the Search Server:
http://<search_server_name>:<port (19000)>/CIC
- Click Check and Fix.
This process can take a significant amount of time.
- Enter the following URL on the Search Server:
- Start all Tealeaf services.