Update docs
This commit is contained in:
61
README.md
61
README.md
@ -4,9 +4,11 @@ SSH-based network device configuration backup tool with support for multiple dev
|
||||
|
||||
## Features
|
||||
|
||||
- **Multi-device backup**: Configure multiple devices in YAML, with `!include` directives
|
||||
- **Multi-device backup**: Configure multiple devices across multiple YAML files with automatic merging
|
||||
- **Device type templates**: Reusable command sets per device type, overridable per individual device
|
||||
- **Flexible authentication**: SSH agent, key files, or password
|
||||
- **Flexible authentication**: SSH agent, key files, or password with SSH config support
|
||||
- **SSH config integration**: Automatically uses `~/.ssh/config` settings for legacy device compatibility
|
||||
- **Modular configuration**: Load and merge multiple YAML files for organized configuration management
|
||||
|
||||
## Quick Start
|
||||
|
||||
@ -24,18 +26,7 @@ make build
|
||||
|
||||
1. **Create configuration files**:
|
||||
|
||||
**Main config** (`config.yaml`):
|
||||
```yaml
|
||||
devices:
|
||||
asw100:
|
||||
user: netops
|
||||
type: srlinux
|
||||
asw120:
|
||||
user: netops
|
||||
type: srlinux
|
||||
```
|
||||
|
||||
**Device types** (`00-device-types.yaml`):
|
||||
**Device types** (`yaml/00-device-types.yaml`):
|
||||
```yaml
|
||||
types:
|
||||
srlinux:
|
||||
@ -43,16 +34,34 @@ make build
|
||||
- show version
|
||||
- show platform linecard
|
||||
- info flat from running
|
||||
centec:
|
||||
commands:
|
||||
- show version
|
||||
- show running-config
|
||||
```
|
||||
|
||||
**Device config** (`yaml/config.yaml`):
|
||||
```yaml
|
||||
devices:
|
||||
asw100:
|
||||
user: netops
|
||||
type: srlinux
|
||||
switch01:
|
||||
user: admin
|
||||
type: centec
|
||||
```
|
||||
|
||||
2. **Run backup**:
|
||||
|
||||
```bash
|
||||
# Backup all devices
|
||||
ipng-router-backup --yaml *.yaml --output-dir /backup
|
||||
# Backup all devices (multiple YAML files are automatically merged)
|
||||
ipng-router-backup --yaml yaml/00-device-types.yaml --yaml yaml/config.yaml --output-dir /backup
|
||||
|
||||
# Or use wildcards
|
||||
ipng-router-backup --yaml yaml/*.yaml --output-dir /backup
|
||||
|
||||
# Backup specific devices
|
||||
ipng-router-backup --yaml *.yaml --host asw100 --output-dir /backup
|
||||
ipng-router-backup --yaml yaml/*.yaml --host asw100 --output-dir /backup
|
||||
```
|
||||
|
||||
3. **Check output**:
|
||||
@ -73,9 +82,25 @@ cat /backup/asw100
|
||||
The tool automatically tries authentication methods in this order:
|
||||
|
||||
1. **SSH Agent** (if `SSH_AUTH_SOCK` is set)
|
||||
2. **SSH Key File** (`--key-file` or default locations)
|
||||
2. **SSH Key File** (`--key-file` or from `~/.ssh/config`)
|
||||
3. **Password** (`--password` flag)
|
||||
|
||||
## SSH Configuration
|
||||
|
||||
The tool integrates with `~/.ssh/config` for seamless connection to legacy devices:
|
||||
|
||||
```bash
|
||||
# ~/.ssh/config
|
||||
Host old-router*
|
||||
User admin
|
||||
Port 2222
|
||||
KexAlgorithms +diffie-hellman-group1-sha1
|
||||
Ciphers aes128-cbc,aes192-cbc,aes256-cbc
|
||||
HostKeyAlgorithms +ssh-rsa
|
||||
```
|
||||
|
||||
This allows connecting to older routers that require legacy SSH algorithms while maintaining security for modern devices.
|
||||
|
||||
## Documentation
|
||||
|
||||
- **[Detailed Documentation](docs/DETAILS.md)** - Complete feature guide, configuration reference, and examples
|
||||
|
Reference in New Issue
Block a user