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

DUMP

location of the backup file

./conf.dump

PGHOST

IP address or hostname of the PostgreSQL database

localhost

PGUSER

role/user used to connect to PGHOST

plixer

PGDATABASE

the database to access at PGHOST

plixer

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

If the target server for the restore has a different MAC address for the interface, manually add the new license key for the correct Machine ID to avoid license corruption.

Additional notes

  • pg_restore errors 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.