Migration¶
In addition to the restore.sh
script for full backups, Plixer Scrutinizer also includes a scrut_util migration utility that can be used to migrate specific subsets of an existing environment to a new server/deployment.
Important
Because the steps outlined here can potentially result in an irrecoverable state for the source and/or destination Plixer Scrutinizer server, it is highly recommended to contact Plixer Technical Support for assistance.
The migration utility saves logs to
/var/log/migrate.log
. The Plixer support engineer will require these logs to better assist with any issues/errors encountered during the process.To view additional information on the
--migrate
command, run the following:/tmp/scrut_util --help migrate
The migration utility supports three types of migration:
Pre-migration requirements¶
Before any type of migration, the source and destination servers must both be prepared for the process.
Preparing the source server
On the source server, create a temporary role for migrations in the Plixer Scrutinizer database:
psql -c "CREATE USER migrator WITH SUPERUSER ENCRYPTED PASSWORD '[PASSWORD]'"
Allow migration connections from the destination’s IP address by running the following on the source server:
DESTINATION=[DESTINATION_IP] sudo sed -i -e "1ihost plixer migrator $DESTINATION/32 md5" /var/db/big/pgsql/data/pg_hba.conf psql -c "SELECT pg_reload_conf()"
Important
For source servers on 18.20, modify the above psql
commands to use the database user (i.e., psql -Uroot plixer -c
… )
Preparing the destination server
The destination Plixer Scrutinizer server must be fully deployed and licensed prior to the migration. It should also already be collecting flows.
On the destination server, update /etc/migrate.ini
with the details of the source server and the temporary migration role.
Configuration migrations¶
Configuration migrations are used to transfer application configuration and user preferences on the source Plixer Scrutinizer server to the destination. Configuration migrations are only supported by source servers on v19.4.0 and above.
To initiate a configuration migration, run the following on the destination server:
SOURCE=[SOURCE_IP]
scp $SOURCE:/etc/plixer.key /etc/plixer.key
sudo systemctl stop plixer_flow_collector
scrut_util --migrate config
sudo systemctl start plixer_flow_collector
Additional notes
By default, the distributed environment configuration of the destination server is retained during configuration migrations. To also migrate the distributed environment settings from the source to the destination (and still preserve the latter’s IP address and machine ID), add the
--force_dist
option as follows:
scrut_util --migrate config --force_dist
While configuration migrations include the Plixer Scrutinizer application configuration, settings that must be applied to the hardware or virtual appliance (e.g., custom listening ports) will not be migrated. These settings must be removed and re-applied in Plixer Scrutinizer after the migration.
Because the migration utility relies on Plixer Scrutinizer’s configuration backup and restore scripts, any additions to the factory SQL codebase are not included in migrations by default. To migrate such modifications, update the
scrut_conf_dump.sh
to include them.
Data migrations¶
Data migrations are used to transfer all flow data still retained on the source Plixer Scrutinizer server to the destination. Data migrations are supported by source servers on v18.2.0 and above.
Note
To maintain reporting continuity after the migration, the destination server should be collecting flows from the same exporters as the source.
To initiate a data migration, run the following on the destination server:
scrut_util --migrate data
Confirm to begin the migration when prompted. The migration may take some time.
Backup migrations¶
Backup migrations are used to apply application configuration and user preferences to the destination Plixer Scrutinizer server from an existing configuration backup. This type of migration is only supported between a source (of the backup) and destination on the same version.
Note
Backup migrations should only be used to transfer configuration data to a different destination appliance/server. To restore from a backup file to the same server, use the restore script instead.
To initiate a backup migration, run the following on the destination server:
scrut_util --migrate restore
This will restore/migrate /tmp/conf.dump
to the destination server.
Restoring from a specified backup file
To use a different backup file, add the --dump_file
option as follows:
scrut_util --migrate restore --dump_file [BACKUP_FILE]
Post-migration¶
After any type of migration, the hba rule and temporary migrator role must be removed from the source Plixer Scrutinizer server.
To do so, run the following:
sudo sed -i '/migrator/d' /var/db/big/pgsql/data/pg_hba.conf
psql -c "SELECT pg_reload_conf()"
psql -c "DROP ROLE migrator"