# IPng Networks Router Backup SSH-based network device configuration backup tool with support for multiple device types and flexible authentication methods. ## Features - **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 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 ## Supported Devices Pre-configured device types with optimized command sets: - **Nokia SR Linux** (`srlinux`) - Show version, linecard, fans, power, full config - **Arista EOS** (`eos`) - Version, inventory, power status, running config - **Centec Switches** (`centec`) - Version, boot images, transceivers, interfaces, config - **Cisco IOS/IOS-XE** (`cisco-ios`) - Version, inventory, config, interfaces, CDP neighbors - **Juniper JunOS** (`junos`) - Version, chassis hardware, configuration, interfaces - **Mikrotik RouterOS** (`routeros`) - Packages, routerboard info, license, interfaces, config Each device type includes carefully selected commands for comprehensive backup coverage. You can override commands per device or create custom device types. ## Quick Start ### Installation ```bash # Install Debian package sudo dpkg -i ipng-router-backup_X.Y.Z_amd64.deb # Or build from source make build ``` ### Basic Usage 1. **Create configuration files**: **Device types** (`00-device-types.yaml`): ```yaml types: srlinux: commands: - show version - show platform linecard - info flat from running centec: commands: - show version - show transciever - show running-config ``` **Device config** (`config.yaml`): ```yaml devices: asw100: user: netops type: srlinux switch01: user: admin type: centec ``` 2. **Run backup**: ```bash # Backup all devices (multiple YAML files are automatically merged) ipng-router-backup --yaml "00-*.yaml" --yaml config.yaml --output-dir /backup # Backup specific devices ipng-router-backup --yaml 00-device-types.yaml --yaml config.yaml --output-dir /backup \ --host "asw*" ``` 3. **Check output**: ```bash ls /backup/ # asw100 asw120 cat /backup/asw100 # ## COMMAND: show version # Hostname : asw100 # Software Version : v25.3.2 # ... ``` ## Authentication 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 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 - **[Manual Page](docs/ipng-router-backup.1)** - Unix manual page - **[Changelog](debian/changelog)** - Version history and changes