Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Backup and Restore the TSDB

Release: Paragon Automation 24.1
{}
Change Release
date_range 19-Jun-24

You can backup and restore the Time Series Database (TSDB) separately from other configuration elements. You must set a user-defined HB_EXTRA_MOUNT1 environment variable on the Paragon Insights server prior to any back up or restore operation.

For example, use the following command to set the environment variable.

content_copy zoom_out_map
export HB_EXTRA_MOUNT1=/root/.kube/config

Here, HB_EXTRA_MOUNT1 is a variable and is user defined.

The backup and restore operations for the TSDB are available only through the Paragon Insights CLI. The backup and restore commands are invoked by using a predefined python script, healthbot.py. You must have root access to the CLI interface of the Paragon Insights server in order to issue these commands.

The generic command along with the required and optional arguments (in square brackets), for performing backup and restore, is described here with examples.

content_copy zoom_out_map
/var/local/healthbot/healthbot tsdb (backup|restore) [-h] [--database DATABASE] [--all] --path PATH

The required arguments for the /var/local/healthbot/healthbot tsdb command are:

  • backup—perfom a backup operation

  • restore—perform a restore operation

  • --path

    • For backup: PATH_TO_DIR—path to the directory where the backup file will be generated.

    • For restore: PATH_TO_DIR/BACKUP_FILENAME—absolute path of backup file that needs to be restored.

  • /var/local/healthbot/healthbot tsdb stop-services—stop service

  • /var/local/healthbot/healthbot tsdb start-services --port portnumber—start service

    Note:

    In Paragon Automation, the TSDB port is not exposed by default. External API queries to TSDB do not need this port to be exposed as well. However, if you use external tools such as Grafana, you need to run the following query to the TSDB directly (and not through APIs) to expose the TSDB port: /var/local/healthbot/healthbot tsdb start-services

The optional arguments for the /var/local/healthbot/healthbot tsdb command are:

content_copy zoom_out_map
-h, --help           show this help message and exit
--database DATABASE  Takes backup (or restore) of the given list of databases. Either
                        database or all flag must be configured
--all                Takes backup (or restores) of all the databases. Either database or
                        all flag must be configured

Back up the TSDB

content_copy zoom_out_map
/var/local/healthbot/healthbot tsdb backup --all --path PATH_TO_DIR

Example – Back up the TSDB and Store it in HB_EXTRA_MOUNT3

content_copy zoom_out_map
/var/local/healthbot/healthbot tsdb backup --all --path $HB_EXTRA_MOUNT3

Restore the TSDB

content_copy zoom_out_map
/var/local/healthbot/healthbot tsdb restore --all --path PATH_TO_DIR/BACKUP_FILENAME

Example – Restore the TSDB from HB_EXTRA_MOUNT2

content_copy zoom_out_map
/var/local/healthbot/healthbot tsdb restore --all --path $HB_EXTRA_MOUNT2
footer-navigation