Use a script in Linux for a docbase backup

IXIA TEXTML Server provides a script to perform your Content Store docbase backup as a background task.

Note: Content Store data is stored in a IXIA TEXTML Server docbase. To back up your Content Store, you must back up the docbase.

There are two very different approaches to a system backup for your docbase. For more information, read the following article about backup and replication: https://www.computerweekly.com/feature/Storage-101-Replication-vs-backup-and-synchronous-vs-asynchronous.

  1. Synchronous backups are a linear process that runs the entire script continuously and in real-time to create a complete copy or clone of the specified files and then waits for confirmation of success before it returns to the command prompt. While it provides a high level of data protection, it involves higher latency and can slow the other applications on the system.
  2. Asynchronous backups are a multi-thread process used in a distributed environment that runs the script while it is performing other tasks and can manage the data transfer to optimize performance and availability, but with greater risk to the dataset.
This script, called backupdocbase.pl, is stored in the following location:
<textml_install_dir>/<instance_name>/perl

Where <textml_install_dir> is the directory where IXIA TEXTML Server is installed and <instance_name> is the name of IXIA TEXTML Server instance. For example:

/opt/ixiasoft/textmlserver/ts01/perl 

To use a script in Linux on the server where the docbase is located for a docbase backup:

  1. Go to the perl directory, such as:
    cd /opt/ixiasoft/textmlserver/ts01/perl
  2. Run the script as follows:
    ./backupdocbase.pl -sn <servername[:port]> -dn <docbasename> -td <targetPath> [-fg <backupflag> -u <username> -p <password> -timer]

    Where:

    OptionDescription
    <servername[:port]> IXIA TEXTML Server filename and port that contains the docbase for backup, using a default value of localhost:2500
    <docbasename> Name of the docbase to back up
    <targetDirectory> Full path to the folder for the docbase backup
    <backupflag> Type of Linux backup where you enter one of the following values:
    • 0: The script runs a synchronous backup and, if the specified target directory exists, the script aborts with the "The destination path is not empty" error message.
      Note: If the specified target directory already exists, the script aborts with an error message of "The destination path is not empty" and the docbase backup does not run.
    • 1 (or TEXTML_BACKUP_OVERWRITE): The script runs a synchronous backup and, if the specified target directory exists, it deletes the existing directory before it runs the docbase backup.
    • 2 (or TEXTML_BACKUP_ASYNC): The script runs an asynchronous backup and, if the specified target directory exists, the script aborts with the "The destination path is not empty" error message.
    • 3 (or TEXTML_BACKUP_OVERWRITE+TEXTML_BACKUP_ASYNC): The script runs an asynchronous backup and, if the specified target directory exists, it deletes the existing directory before it runs the docbase backup.
    The default value is 0.
    <username> <password>] The name and password of the user with the IXIA TEXTML Server System Administrator's role used to run the backup.
    -timer (Optional) Returns the duration, measured in seconds, of the backup operation.
    Note: If you do not specify any argument when running the script, the script will prompt you for the required information.

    For example:

    ./backupdocbase.pl -sn localhost:2500 -dn SportsStories -td /docbase_backups/4.4/SportsStories -fg 1 -timer
    When the backup starts, the TEXTML Server creates a file called backuperror.tmp in the target directory. The script replaces this file with the backup.info file if the backup successfully completes.
  3. To confirm that the backup was successful, look in your target directory.
    • If the backup.info file is present, then the backup successfully completed.
    • It the backup completed but the backuperror.tmp is present, then an error occurred and the backup is corrupt.

    For example:

    The backup ran and you either confirmed its success or began to troubleshoot the problem.