Command Line Reference¶
Gufo Thor is managed via gufo-thor command.
Show Version¶
To show Gufo Thor version use:
Backups¶
Create a backup of PostgreSQL, MongoDB, and ClickHouse:
Pass an optional first argument to choose the backup directory name. Without it, Thor uses the current timestamp. Specify one or more of --postgres, --mongo, and --clickhouse to back up selected services. If none are specified, all supported services are backed up:
gufo-thor backup create before-upgrade
gufo-thor backup create --postgres
gufo-thor backup create --mongo --clickhouse
List backups in newest-first order, with their duration and per-database and total sizes:
Remove a named backup and all of its files with gufo-thor backup rm <name>:
Restore all database dumps present in a named backup, or specify one or more of --postgres, --mongo, and --clickhouse to restore selected databases. Thor pauses running application containers during restoration:
Generate Sample Config¶
To generate sample config use:
where <config_name> is the name of the template. Refer to the Configuration Templates for details.
Available templates:
simple: Web-only setup.common: Web interface, hardware integration, and event-processing pipeline.lab1: Full hardware integration stack and a sample lab with three VyOS routers connected in a ring.
Prepare¶
To generate all necessary configs without launching NOC use
This command only prepares configuration files; it does not start containers. The up command performs this preparation automatically.
Running NOC¶
To run NOC use:
Note
This command performs prepare automatically.
Stopping NOC¶
To stop NOC use:
Restarting Process¶
To restart NOC process use:
Example:
Running Shell¶
To run NOC shell use:
Thor starts a separate temporary container with the NOC image, connected to the configured databases, and opens Bash so you can run NOC commands.
Show Stats¶
To show NOC processes' statistics use:
Example output:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
71d5c1a4b980 thor-web-1 0.12% 312MiB / 15.6GiB 1.95% 2.1MB / 1MB 0B / 0B 28
8ea23ff177c3 thor-postgres-1 0.04% 96MiB / 15.6GiB 0.60% 840kB / 1MB 0B / 0B 12
The command streams live statistics; names and values depend on the installation.
Show Process' Logs¶
To show NOC process' logs use:
Example:
To use logs in follow mode:
Upgrading NOC¶
To upgrade NOC to a new version use:
The command pulls all images in the Compose project, including NOC services, databases, and other infrastructure components.
Migrating MongoDB FCV¶
To migrate MongoDB's Feature Compatibility Version (FCV) to the version required by the configured NOC release, one supported FCV at a time, use:
The command records each completed FCV in the Thor state file and prints the total migration time.
Destroying Installation¶
To destroy installation and free resources:
Pausing/unpausing Container¶
To temporary pause NOC services' containers use:
Paused containers remain running, preserve existing connections, and receive no CPU time until resumed.
To resume execution:
This resumes the containers and their processes; their existing connections are preserved during the pause.