Backing Up Product Data
To make a consistent backup of your Paragon Active Assurance data, you need to stop all services accessing the database before starting the backup procedure. It is possible to make backups of a live system, but data consistency cannot then be guaranteed.
Proceed as follows:
-
Stop Paragon Active Assurance services:
sudo systemctl stop "netrounds-*" apache2 kafka openvpn@netrounds
-
Make backups according to the subsections below.
-
Start Paragon Active Assurance services:
sudo systemctl start --all "netrounds-*" apache2 kafka openvpn@netrounds
Backing Up the Main PostgreSQL Database and Plugin Database
The plugin database is created along with the main PostgreSQL database, but it needs to be backed up separately.
Run these commands:
pg_dump -h localhost -U netrounds netrounds > cc_postgres.sql pg_dump -h localhost -U netrounds paa-plugins > paa_plugins.sql
The pg_dump
command will ask for a password which can be found in
/etc/netrounds/netrounds.conf
under "postgres database". The default
password is "netrounds".
To learn about advanced options of pg_dump
, such as compression, type
pg_dump --help
Alternatively, you may want to back up the database in binary format. If so, use this command:
pg_dump -h localhost -U netrounds -Fc netrounds > cc_postgres.binary pg_dump -h localhost -U netrounds -Fc paa-plugins > paa_plugins.binary
Backing Up the RRD Files
The RRD (round-robin database) files contain the Paragon Active Assurance measurement data.
-
For a small-scale setup (< 50 GB), use this backup command:
sudo tar -czf cc_rrd.tar.gz /var/lib/netrounds/rrd
-
For a large-scale setup (> 50 GB), making a tarball of the RRD files might take too long, and taking a snapshot of the volume can be a better idea. Possible solutions for doing this include: using a file system that supports snapshots, or taking a snapshot of the virtual volume if the server is running in a virtual environment.
Backing Up Plugin Files
Back up plugin files with the commands
sudo tar -czf paa_plugins.tar.gz /var/lib/netrounds/plugins sudo tar -czf paa_plugin_keys.tar.gz /etc/netrounds/plugin_keys
Backing Up the TimescaleDB Database
TimescaleDB uses the tool PGBackRest (pgbackrest.org) to manage backup and restore. This tool is used by
the script backup-restore-timescaledb.sh
which is what you run as a Paragon
Active Assurance user.
PGBackRest uses the concept of stanzas. A stanza is the configuration for a
PostgreSQL database cluster that defines where it is located, how it will be backed up, what
the archiving options are, etc. In Paragon Active Assurance, only one stanza is defined by
default, named paa-metrics
. As only one stanza exists, it does not need to
be specified in the backup command, and it has been omitted below.
To back up the TimescaleDB database, you must first start it.
Backup of the TimescaleDB database also requires the netrounds-timescaledb
service related to the Streaming API to be enabled and running:
sudo systemctl enable netrounds-timescaledb sudo systemctl start netrounds-timescaledb
For more information on this API, see the document Streaming API Guide.
To back up the TimescaleDB database manually, run:
sudo /etc/netrounds/backup-restore-timescaledb.sh --backup
The backup operation creates either an incremental backup or a full backup. The latter occurs if no previous backups are present in the stanza.
Backups of TimescaleDB data are stored in
/var/lib/netrounds/rrd/timescaledb/pgbackrest/repo/backup
.
Backing Up the OpenVPN Keys
Use this command:
sudo tar -czf cc_openvpn.tar.gz /var/lib/netrounds/openvpn
Backing Up the Licenses
Use this command:
sudo tar -czf cc_license.tar.gz /var/lib/netrounds/license
Backing Up the Configuration Files
Make copies of the following files:
/etc/apache2/sites-available/netrounds-ssl.conf
/etc/apache2/sites-available/netrounds.conf
/etc/netrounds/consolidated.conf
/etc/netrounds/metrics.yaml
/etc/netrounds/netrounds.conf
/etc/netrounds/plugin.yaml
/etc/netrounds/probe-connect.conf
/etc/netrounds/restol.conf
/etc/netrounds/test-agent-gateway.yaml
/etc/netrounds/timescaledb.conf
/etc/openvpn/netrounds.conf
For example:
cp /etc/apache2/sites-available/netrounds-ssl.conf /etc/apache2/sites-available/netrounds-ssl.conf.old