In the Portal Management page, you can enable daily backups and configure settings for automated daily backups of event model data, which are stored on the Report Server in the designated directory. As needed, Portal backups can be restored, returning your Tealeaf solution to a previously saved state.
Before scheduling automated backups, you should perform a single on-demand backup first to assess the storage requirements for each backup. Then, you can determine the space available for retaining backups on the server and configure the number retained accordingly.
Note:
- This backup feature cannot be used to backup the event data model and restore it across versions of Tealeaf. To migrate events across Tealeaf systems and versions, you must use the import/export features of the Event Manager.
-
This backup feature does not archive any data captured or extracted from sessions. That data is stored in the Tealeaf databases, which must be backed up through the Database Manager or SQL Server Management Studio.
- In the left panel of the Portal Management page, click Backup & Restore.
- Click Backup Settings.
- To change any of the following settings, click Edit.
Setting Description Backup Directory
Directory within the install directory where backups are stored.
Note: Only UNC and absolute file paths are supported.
Backup Time
Time of day when backups are created. By default, the time is set to 12 midnight ( 00:00
).Number of Backups Retained
Number of days of backup data that are retained in the
Backup Directory
.Note:
- This setting is not enforced until scheduled backups have been enabled. If scheduled backups are disabled, all backups in the directory are retained.
- If you wish to retain event model data backups for longer than the number of days specified in this setting, you can download the backup from this screen to your local system for safekeeping. Older backups are purged from the directory by Tealeaf.
Scheduled Backups
Note: - If scheduled backups are disabled, all backups in the directory are retained. If you have more than the
Number of Backups Retained
stored in the directory, enabling this setting causes the oldest backups to be purged when the first scheduled backup is executed. - This setting must be enabled to perform scheduled backups of event model data.
- When backups are run, you can review them through the Portal. In the Backup & Restore panel, click Backup/Restore.
Note: Backup files are compressed and encoded. They cannot be read outside of the Tealeaf environment.
Setting up database backups using scripts
As part of the installation process, a set of database backup scripts is generated. You an modify these scripts to backup your databases.
The scripts are stored in the following directory:
<install_directory>\Reporting\DatabaseSchema
Generated backup script files are of the following pattern: *DBBackup.sql
Follow this procedure to set up database backup scripts.
- Each backup script contains a section of variables at the top of the file. The values of these variables are the only things that should be edited in the file, as follows:
/***************************************************** * Script Variables * @jobName - The name of the backup job * @jobOwner - The SQL Server Login that will own the backup job * @operator - The name of the email operator who will be notified * if the job fails (added through sp_add_operator). * @scheduleName - The name of the backup job schedule * @database - The name of the CX database * @fullBackupFile - The filename of the full backup of the database. * By default this will be * overwritten with a new backup twice a week (Sunday, * Wednesday). * @logBackupFile - The filename of the log bakup for the database. * This will be appended to * daily and started fresh on Monday and Thursday by * default. ******************************************************/ DECLARE @database nvarchar(256), @fullBackupFile nvarchar(256), @jobOwner nvarchar(128), @jobName nvarchar(128), @scheduleName nvarchar(128), @serverName nvarchar(30), @operator nvarchar(128), @backupCmd nvarchar(4000); SELECT @jobName = N'cxImpact Reporting Database Backup', @scheduleName = N'cxImpact Reporting Backup Job', @jobOwner = N'sa', @database = N'TL_REPORTS', @fullBackupFile = N'c:\Tealeaf\db_backups\tl_reports_full.bak', @serverName = N'(local)', @operator = NULL; /********* DO NOT CHANGE ANYTHING BELOW THIS LINE *********/
- The only required change is to assign valid file paths to the
@fullBackupFile
and@logBackupFile
variables. - To create and schedule a backup for a particular database:
- Open the file in SQL Server Management Studio. The scripts must be run as SA or an equivalent login.
- Set the files paths correctly.
- If the SQL Server Notification service is being used, set the
@operator
variable to a valid SSNS Operator. When run, the backup job sends email to the specified address. - Run the script.
SQL Server notifications
If the SQL Server Notification Service is installed and enabled, the backup jobs can be configured to send email notifications upon success, failure, or both.
By default, the backup jobs that are created by the scripts insert a message in the Event Log if the backup job fails to run.
- The reason for the error can be seen by viewing the history of the backup job in SQL Server Management Studio.
- The backup jobs can be configured to send emails on success and failure if the SQL Server Notification Service is installed and enabled.
Using SQL Notification Service requires the creation of an Operator. To assist, an extra script, AddNotificationOperator.sql
, is created during the installation process in the same directory as the backup scripts.
To create the operator:
- Open the
AddNotificationOperator.sql
script in SQL Management Studio. - Set valid display name and email address values.
- Run the script.
Setting up database backups using the Database Manager
You can use Database Manager to perform incremental and full backups of individual databases, which are useful for creating backups before you perform other TDM database operations.
- Backups from the Database Manager require the SQL Server Agent service to be enabled. Verify that this service was enabled through the Services Control Panel.
- Backups that are created from Database Manager run at midnight according to the local system clock. They use the user account that was used to create the backup job. If a
.bak
does not yet exist for the backup job, it is created on first execution.
Note: The Database Manager can be used to schedule incremental backups of Tealeaf databases. To run a full, on-demand backup of all Tealeaf databases, you should use SQL Server Management Studio.
Use this procedure to create a backup job in Database Manager.
- To back up a database, select Mode > Job Management > Backup Jobs.
The Create Backup Job window is displayed.
- From the Database drop-down, select the database to back up.
- Provide a name and meaningful description.
- Select locations where Full and Diff (incremental) backups can be stored.
Note: These directories must be absolute directories local to SQL Server. You cannot use network paths for these locations.
- To run the specified backup, click OK.
- Review the output window for any errors. Depending on the size of the database, the backup may take several minutes.
You can also review the history of backup jobs, including the individual steps within the backup. To review database backup history, select Mode > Job Management > Backup Job History.
Backing up event model data
At any time, you can archive event model data to the specified backup directory through the Portal. For example, if you are experimenting with Portal settings or performing significant modifications to your event definitions, you may wish to perform an on-demand backup before beginning to make these changes.
Note: If backups take more than two minutes, you should consider scheduling during off-peak hours.
- From the Portal Management page, click Backup & Restore.
- Click Backup/Restore.
The backup is generated and stored in the backup directory. An entry is listed in the Portal Management page.
On the Report Server, this backup is stored in the specified backup directory and retained until a specified number of backups have been stored there.
Note: If you wish to retain event model data backups for longer than the number of days specified in this setting, you must configure an task external to Tealeaf to move these backups to a different directory. Older backups are purged from the directory by Tealeaf.
Creating on-demand backups
To create an immediate backup, complete the following steps:
Note: If backups take more than two minutes, you should consider scheduling during off-peak hours.
- In the Portal Management page, click Backup & Restore.
- Click Backup/Restore.
- Click Create Backup.
The backup is created and stored in the designated directory. It is available in the Backup/Restore list of backups.
Restoring backups
Complete the following steps to restore a scheduled or on-demand backup.
Restoring a backup overwrites event model data with the contents of the backup. Any changes that you have made to your event model subsequent to the time when the backup was saved are lost. Before you restore a backup, you might want to perform a backup of the current event model.
Note: The backup is immediately applied to the environment.
- Restore the system only during off-peak hours.
- Restoring a backup automatically forces all users out of the Portal and does not save any unsaved work.
- In the Portal Management page, click Backup & Restore.
- Click Backup/Restore.
- For the backup you want to restore, click the Restore link.
When the backup is uploaded, the contents of the backup are immediately applied to the environment.
- Restart all Tealeaf services.
Scenario - Migrating events between Dev and Test
This backup feature can be used to migrate complete sets of event definitions between Tealeaf environments. For example, if you have been working on event definitions in a Development environment, you can use this backup feature to migrate to your Test environment.
- This backup and restore feature replaces entire sets of event and event objects. Objects in the destination system that do not exist in the source system are deleted. Before you begin, you should deploy any individual changes that you wish to keep from the destination system into the source system, if they do not exist there.
- In the following scenario, the event model from the Development system is backed up and restored into a Test system.
- Note that this backup procedure overwrites event definitions. Depending on how event definitions are managed in a Production environment, this workflow may not be suitable for publishing into your live transaction stream.
- Create an event model backup on the Dev system.
- Install a fresh Test system.
- Copy over the backup file that you created on the Dev system to the directory where backups are stored on the Test system. Copy the exported
.tlb
file to the import directory on the destination system. - Restore through the Portal on the Test system.
The Test system now has the events and dimensions from the backup created on the Dev system, including dimension whitelist values and group list values.