Pim van Pelt 96c7c3aeaa Update README
2025-07-06 18:23:45 +02:00
2025-07-06 18:21:32 +02:00
2025-07-06 17:55:11 +02:00
2025-07-06 17:14:29 +02:00
2025-07-06 18:21:32 +02:00
2025-07-06 16:03:51 +02:00
2025-07-06 10:57:53 +00:00
2025-07-06 18:23:45 +02:00

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

  1. 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-config
    

    Device config (config.yaml):

    devices:
      asw100:
        user: netops
        type: srlinux
      switch01:
        user: admin
        type: centec
    
  2. Run backup:

# Backup all devices (multiple YAML files are automatically merged)
ipng-router-backup --yaml 00-device-types.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 asw100
  1. 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:

  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:

# ~/.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

Description
Go program that performs router backups via SSH
Readme Apache-2.0 261 KiB
Languages
Go 95.2%
Makefile 4.8%