Restore Backup Using CLI

You can restore your OT Security using CLI or via the Tenable Core interface. For more information about the restore process in Tenable Core, see Restore a Backup. To restore using CLI, perform the following steps.

Note: You can only restore backups taken using the Tenable Core backup utility. Older backups from OT Security before version 3.18 are not compatible. If you are trying to restore from a backup captured in an older version of OT Security, before version 3.18, contact support for the necessary instructions and commands.

Before you Begin

  • Make sure you have the backup .tar files to restore. Use an SCP (Secure Copy Protocol) utility to copy the .tar file to the ICP system.

    Note: You can download the OT Security backup files from the Backup/Restore page in Tenable Core. For more information, see Restore a Backup.
    Example of an OT Security backup file: tenable-ot-tenable-s2cc78kg-2024-03-21T135648.tar.

To restore your OT Security using CLI:

  1. To access the ICP system, do one of the following:
    • Log in to Tenable Core and access the terminal.
    • Log in using SSH.
  2. In the terminal, run the following command to extract the .tar backup file.

    Copy
    tar -xvf file-name.tar

    Where: file-name is the name of the .tar backup file.

    The .tar backup file gets unzipped to a folder: /home/admin/folder-name.

    Note: The extracted files include smaller tar.xz files.

  3. Run the following command to stop the service and remove existing data that the backup files will replace.

    Copy
    sudo systemctl stop anthology
    cd /opt/indegy
    sudo rm -rf *db*
    sudo rm -rf machine_id/id
    cd ~

  4. Switch to the folder that contains the extracted .tar files from Step 3.

    cd <folder-name>

    Where: folder-name is the name of the folder that contains the extracted files.

  5. (Optional) Run the ls command to view the list of tar.xz files from the backup.

  6. Run the following commands to extract the backup files and restore the application:

    Copy
    for i in *.tar.xz; do tar -xvf "$i" -C "/opt/indegy/" "*db*"; done
    for i in *.tar.xz; do tar -xvf "$i" -C "/opt/indegy/" "machine_id/id"; done

    Note: The above command extracts all files from the backup to their respective folders. If you see any error messages, make sure you are running the command from the folder created when unpacking the .tar file.

  7. Restart OT Security.

    Copy
    sudo systemctl start anthology

    OT Security gets restored and you can start accessing the application.

  8. To verify that OT Security is running, use your browser to log in to the OT Security user interface via port 443 (HTTPS).