83797aaa34b242fe61b5dda9649a052984e6fb1e
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/configsettings 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
# 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 (
00-device-types.yaml):types: srlinux: commands: - show version - show platform linecard - info flat from running centec: commands: - show version - show transciever - show running-configDevice config (
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 "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*"
- 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_SOCKis set) - SSH Key File (
--key-fileor from~/.ssh/config) - Password (
--passwordflag)
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%