Restoring from a full backupΒΆ
To restore a Plixer Scrutinizer instance from a full backup file, use the restore.sh
utility located under home/plixer/scrutinizer/files
.
The script will fully restore all backed up elements of a Plixer Scrutinizer instance, provided the following conditions are met:
A valid full backup file is accessible by the
plixer
user at the specified ($BACKUPDIR) remote location.The Plixer Scrutinizer instance to be used for the restore has been freshly deployed.
The version of the backup matches the version of the fresh Plixer Scrutinizer instance to restore to (e.g. a 19.3.0 backup can only be restored to a new 19.3.0 instance).
Important
A restore completely overwrites the state of the target instance and deletes the source backup file. It is highly recommended to always restore from a copy of a backup file.
If the restore target is the primary reporter in a distributed cluster, contact Plixer Technical Support for assistance.
The following instructions cover the process of restoring from a backup file on a remote host to a fresh Plixer Scrutinizer deployment:
SSH to the target Plixer Scrutinizer server for the restore, and start a tmux session to prevent timeouts:
tmux new -s restore
Allow others to use FUSE mounts:
sudo grep -Eq "^user_allow_other" /etc/fuse.conf || \ sudo sed -i '$ a user_allow_other' /etc/fuse.conf
Create the backup directory locally and mount the remote directory containing the backup file(s):
BACKUPDIR=/mnt/backup sudo mkdir -p $BACKUPDIR sudo chown plixer:plixer $BACKUPDIR sshfs -o allow_other -o reconnect REMOTE_USER@REMOTE_HOST:REMOTE_DIRECTORY $BACKUPDIR
Run
restore.sh
as theplixer
user, with the remote directory set as the backup file location:BACKUPDIR=/mnt/backup ~plixer/scrutinizer/files/restore.sh
When prompted, enter
yes
to select the backup file to use for the restore orno
to have the script continue searching (if the backup file was not previously specified).Hint
To specify the file to use for the restore, use
BACKUPDIR=/mnt/backup BACKUP=restore_filename.tar.gz ~plixer/scrutinizer/files/restore.sh
at the previous step instead.Once the script confirms that the restore has been completed, unmount the remote backup directory:
BACKUPDIR=/mnt/backup fusermount -u $BACKUPDIR sudo rmdir $BACKUPDIR
Important
The restore.sh
utility does not restart Plixer Scrutinizer services after it completes running.
Based on the role of the Plixer Scrutinizer instance, proceed to finalize setup of the restored server:
If the restored instance is a standalone server, run the following to restart all services and register it:
scrut_util --services --name all --switch restart scrut_util scrut_util --set selfregister --reset
These commands may take several minutes to complete.
If the restored instance is a remote collector in a distributed cluster, run the following on the primary reporter to register it:
scrut_util --set registercollector --ip [IP address of restored instance]
If the restored instance is a primary reporter in a distributed cluster or a standalone server, and its Machine ID is different from that of the backup file, contact Plixer Technical Support to obtain a new license key.