Back up and restore NXLog Platform

You can create full system backups for NXLog Platform using the nxp_manage.sh backup command. To restore your system to full working order from a backup on the same or different machine, use the nxp_manage.sh restore command.

See System and log database backups to learn more about NXLog Platform backups.

Performing a backup

Follow these steps to create your NXLog Platform backup:

  1. Log in to the NXLog Platform server, for example, via ssh:

    $ ssh <user>@<hostname>
  2. Run the following command to create a backup. This command gracefully shuts down NXLog Platform and restarts it when the backup is completed.

    $ nxp_manage.sh backup
    The default location for backups is the /srv/nxp/backup directory. See how to change the backup directory.

As a result of this procedure, NXLog Platform creates a backup file with the name in the format backup_<date>_<time>.tar.gz.

Restoring the system from a backup

You can restore NXLog Platform from a backup on the same machine or on a new, clean machine.

Restoring on the same machine

Before restoring a backup, ensure that the current NXLog Platform version matches the one on which the backup was created.

Follow these steps to restore a backup on a system with NXLog Platform already installed:

  1. Log in to the NXLog Platform server, for example, via ssh:

    $ ssh <user>@<hostname>
  2. Run the following command to restore the backup, replacing the file name with the name of the backup file you want to restore. This command gracefully shuts down NXLog Platform and restarts it when the restore finishes.

    $ nxp_manage.sh restore BACKUP_FILE=<BACKUP_FILENAME.tar.gz>

    For example:

     nxp_manage.sh restore BACKUP_FILE=/srv/nxp/backup/backup_20240815_151527.tar.gz

Restoring on a different machine

Before you restore on a new machine, ensure that it has the same DNS name as the machine where the backup was created. Provided the DNS name is the same, all agents should be able to reconnect to the restored NXLog Platform instance without reconfiguring them.

Follow these steps to restore a backup on a new system:

  1. Log in to the new machine, for example, via ssh:

    $ ssh <user>@<hostname>
  2. Follow the instructions to install NXLog Platform.

    Ensure that you install the same NXLog Platform version as the one on which the backup was created.
  3. Copy the backup file to the new machine.

  4. Run the following command to restore the backup, replacing the file name with the name of the backup file you want to restore. This command gracefully shuts down NXLog Platform and restarts it when the restore finishes.

    $ nxp_manage.sh restore BACKUP_FILE=<BACKUP_FILENAME.tar.gz>

    For example:

     nxp_manage.sh restore BACKUP_FILE=/srv/nxp/backup/backup_20240815_151527.tar.gz