2a1ed2dd35de1a1a0c7b8d6564acfba5635da57b
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
Quick Start
Installation
# Install Debian package
sudo dpkg -i ipng-router-backup_X.Y.Z_amd64.deb
# Or build from source
make build
Basic Usage
-
Create configuration files:
Device types (
yaml/00-device-types.yaml
):types: srlinux: commands: - show version - show platform linecard - info flat from running centec: commands: - show version - show running-config
Device config (
yaml/config.yaml
):devices: asw100: user: netops type: srlinux switch01: user: admin type: centec
-
Run 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/*.yaml --host asw100 --output-dir /backup
- Check output:
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:
- SSH Agent (if
SSH_AUTH_SOCK
is set) - SSH Key File (
--key-file
or from~/.ssh/config
) - Password (
--password
flag)
SSH Configuration
The tool integrates with ~/.ssh/config
for seamless connection to legacy devices:
# ~/.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 - Complete feature guide, configuration reference, and examples
- Manual Page - Unix manual page
- Changelog - Version history and changes
Description
Languages
Go
95.2%
Makefile
4.8%