Configuration backups¶
For more “lightweight” backup and restore operations, the scrut_conf_dump.sh and scrut_conf_restore.sh scripts can be used to target only the application/configuration data of a Plixer Scrutinizer instance, including:
User-added maps
Dashboards
IP Groups
Saved Reports
3rd-party integration settings
Configuration backups do not include any collected flow data.
Note
In distributed environments, the primary Reporter regularly syncs application/configuration data to remote Collectors. Only the configuration backup of the primary Reporter is needed to perform a restore for the cluster.
scrut_conf_dump.sh and scrut_conf_restore.sh use Postgres’s pg_dump and pg_restore utils and respect the same set of environment variables:
Variable |
Description |
Default |
|---|---|---|
|
location of the backup file |
|
|
IP address or hostname of the PostgreSQL database |
|
|
role/user used to connect to PGHOST |
|
|
the database to access at PGHOST |
|
Note
To avoid potential issues, use the services command to stop the plixer_flow_collector service before attempting to restore from a configuration backup.
- Backup
./scrut_conf_dump.sh
Dumping to a specified location
DUMP=/tmp/somewhere.else ./scrut_conf_dump.sh
- Restore
./scrut_conf_restore.sh
Restoring to a remote database from a local dump file:
PGHOST=42.42.42.42 DUMP=/tmp/before_instance_nuked.dump ./scrut_conf_restore.sh
Important
The scrut_conf_restore.sh script is meant to be used for restoring configuration data for the same Plixer Scrutinizer server/appliance. To apply a configuration backup to a different server, follow the steps for backup migrations in the migration guides.
Additional notes
pg_restoreerrors typically only cause the restore to fail for the table associated with the error. Other tables should still be restored successfully.Errors associated with duplicate keys usually indicate a conflict between existing rows in the table and the rows being restored.
pg_restore: [archiver (db)] Error from TOC entry 51348; 0 17943 TABLE DATA exporters plixer pg_restore: [archiver (db)] COPY failed for table "exporters": ERROR: duplicate key value violates unique constraint "exporters_pkey" DETAIL: Key (exporter_id)=(\x0a4d4d0a) already exists.
The conflicting keys should be removed from the table before attempting to restore again.
If you are swapping IP addresses, the database keys should be rotated using
scrut_util --pgcerts --verbose, because the backed up keys will be associated with the old address.