Backup

Restore is possible only to the same version of Collector from which the backup was made.

Collector stores its settings and flow data. The process of backup and restore is written further only for flow data.

Flows Backup

Backup should be run on the server that stores the flows.

If Collector is stopped before starting the backup, you need to start the metrics storage module (docker-compose up -d clickhouse) and stop it after the backup procedure (docker-compose stop clickhouse).

docker-compose exec clickhouse sh -c 'backup'
docker cp collector_clickhouse_1:/tmp/flows.tar.zst .
docker-compose exec clickhouse rm /tmp/flows.tar.zst

Restoring From a Backup

The commands assume that the backup files are located in the working directory /srv/collector, however, the location of the files can be anything:

  • on a remote server;
  • on USB storage devices;
  • in any system directory.

In this case, the commands must contain the full path to the backup files.

Restoring Flows

Runs on the server that stores the metrics.

  1. Run Clickhouse (If it is stopped)

    docker-compose up -d clickhouse
  2. Transfer the backup to the container and restore the data

    docker cp flows.tar.zst collector_clickhouse_1:/tmp
    docker-compose exec clickhouse sh -c 'restore /tmp/flows.tar.zst'
  3. Delete a backup archive from a container

    docker-compose exec clickhouse rm /tmp/flows.tar.zst