22.13 Sample Analytics Dashboard Snapshot and Restore

This section provides an example of how the Analytics Dashboard data on a SLES machine is backed up and restored to a RHEL machine.

Prerequisites:

  • Analytics Server must be installed and working on a SLES machine.

  • Analytics Server must have some data to be backed up and restored.

  • Install Python3 or later and requests package on the RHEL machine. Run the following commands to install Python and its packages:

    yum install python3

    pip install requests

Perform the following steps to back up data from a SLES machine and restore to a RHEL machine:

  1. Run the following command on the Analytics Dashboard server to map the file system:

    chown -R novlwww:novlwww /var/elasticsearch/snapshot/

  2. Run the following command to mount the NFS:

    mount -t nfs 10.71.142.90:/var/elasticsearch/snapshot /var/elasticsearch/snapshot

  3. Verify if the NFS is working by creating a test file and remove the file when the test is complete.

  4. Run the backup script.

    sh /opt/novell/nam/scripts/ELKBackup.sh

  5. Run the following command to create manual snapshot:

    curl -X PUT http://127.0.0.1:9200/_slm/policy/nightly-snapshots/_execute?pretty

  6. Delete Analytics Server from Administration Console.

  7. Install Analytics Dashboard on the RHEL machine.

  8. Run the following command on the RHEL machine to map the file system:

    chown -R novlwww:novlwww /var/elasticsearch/snapshot/

  9. Run the following command to mount the NFS:

    mount -t nfs 10.71.142.90:/var/elasticsearch/snapshot /var/elasticsearch/snapshot

  10. Run the restore script.

    sh /opt/novell/nam/scripts/ELKRestore.sh