Web Console backup and restore

Manual Backup

To manually backup the Web Console:

  1. Log into the Appliance Command Line Interface (CLI).

  2. Run the following command to create a new backup. Optionally, specify a different name for the backup file without the extension (tgz is automatically added):

    BASH
    sudo /var/nexthink/console/helpers/backup-console.sh <backup file>

The backup file contains the full database of the Web Console (console-db.backup) and the content of the following files:

  • /var/nexthink/common/* (all files in the directory)

  • /etc/yum/pluginconf.d/proxy.conf

  • /var/nexthink/console/etc/certificate.pem

Find the backup file in the following directory:

/var/nexthink/console/backup

Automatic Backup

Every day at 01:10 an automatic backup is triggered using a crontab entry. Up to 10 backups files are used to keep history, all located in the directory:

/var/nexthink/console/backup

A link file named console-backup.tgz is also created in that directory, pointing to the last backup.

Restoring the Web Console

To completely restore the Web Console settings and account configuration, log into the Appliance shell, get your backup file, and follow the next steps:

  1. Stop the Web Console:

    BASH
    sudo systemctl stop nxconsole
  2. Untar your backup file (suppose that it is named console-backup.tgz) in a directory in your home:

    BASH
    mkdir console-bk
    tar xvzf console-backup.tgz -C console-bk
  3. Copy the configuration files in the backup to their intended location:

    BASH
    cd console-bk
    sudo cp -R var/nexthink/common/* /var/nexthink/common
    sudo cp etc/yum/pluginconf.d/proxy.conf /etc/yum/pluginconf.d
    sudo cp var/nexthink/console/etc/certificate.pem /var/nexthink/console/etc
    sudo cp var/nexthink/console/etc/custom_salt /var/nexthink/console/etc
  4. Drop the database of the Web Console:

    BASH
    dropdb -U postgres console
  5. Drop the console user of the database:

    BASH
    dropuser -U postgres console
  6. Create an empty database: /var/nexthink/console/helpers/create-db.sh

  7. Restore the database of the Web Console (console-db.backup file from the backup):

    BASH
    pg_restore -U postgres -d console console-db.backup
  8. Restart the Web Console:

    BASH
    sudo systemctl start nxconsole

The Web Console is now restored with all its users and settings in place.

The operations described in this article should only be performed by a Nexthink Engineer or a Nexthink Certified Partner.

If you need help or assistance, contact your Nexthink Certified Partner.


RELATED TASK

RELATED REFERENCE

Last updated