Move to yaml.v3 and mergo. Refactor config parsing into a package. Refactor SSH connections into a package. Create default YAML directory, and update docs
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
ipng-router-backup \- SSH Router Backup Tool
|
||||
.SH SYNOPSIS
|
||||
.B ipng-router-backup
|
||||
.RI --config " CONFIG_FILE"
|
||||
.RI --yaml " CONFIG_FILE(S)"
|
||||
.RI [ --output-dir " DIRECTORY" ]
|
||||
.RI [ --password " PASSWORD" ]
|
||||
.RI [ --key-file " KEYFILE" ]
|
||||
@ -11,13 +11,14 @@ ipng-router-backup \- SSH Router Backup Tool
|
||||
.RI [ --host " HOSTNAME" ]...
|
||||
.SH DESCRIPTION
|
||||
.B router_backup
|
||||
is a tool for backing up router configurations via SSH. It connects to multiple routers defined in a YAML configuration file and executes commands, saving the output to files.
|
||||
is a tool for backing up router configurations via SSH. It connects to multiple routers defined in a
|
||||
set of YAML configuration file(s) and executes commands, saving the output to files.
|
||||
.PP
|
||||
The tool supports multiple device types with predefined command sets, SSH agent authentication, and automatic file organization.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BR --config " \fICONFIG_FILE\fR"
|
||||
YAML configuration file path (required)
|
||||
.BR --yaml " \fICONFIG_FILE\fR"
|
||||
YAML configuration file(s) (required)
|
||||
.TP
|
||||
.BR --output-dir " \fIDIRECTORY\fR"
|
||||
Output directory for command output files (default: /tmp)
|
||||
@ -73,22 +74,22 @@ For each device, a text file named after the hostname is created in the specifie
|
||||
.TP
|
||||
Basic usage:
|
||||
.EX
|
||||
ipng-router-backup --config /etc/ipng-router-backup/config.yaml
|
||||
ipng-router-backup --yaml /etc/ipng-router-backup/*.yaml
|
||||
.EE
|
||||
.TP
|
||||
Custom output directory:
|
||||
.EX
|
||||
ipng-router-backup --config config.yaml --output-dir /home/user/backups
|
||||
ipng-router-backup --yaml config.yaml --output-dir /home/user/backups
|
||||
.EE
|
||||
.TP
|
||||
Using password authentication:
|
||||
.EX
|
||||
ipng-router-backup --config config.yaml --password mysecretpass
|
||||
ipng-router-backup --yaml config.yaml --password mysecretpass
|
||||
.EE
|
||||
.TP
|
||||
Process specific hosts only:
|
||||
.EX
|
||||
ipng-router-backup --config config.yaml --host asw100 --host asw120
|
||||
ipng-router-backup --yaml config.yaml --host asw100 --host asw120
|
||||
.EE
|
||||
.SH FILES
|
||||
.TP
|
||||
|
Reference in New Issue
Block a user