# IPng Networks Router Backup Configuration Example # Copyright 2025, IPng Networks GmbH, Pim van Pelt # # This file demonstrates how to configure the ipng-router-backup tool. # Copy this file to a location of your choice and modify for your environment. # # Usage: ipng-router-backup --config /path/to/your/config.yaml # # YAML !include Support: # You can split large configurations into multiple files using !include directives. # Examples: # !include device-types.yaml # !include devices/production.yaml # !include "devices/lab environment.yaml" # Use quotes for paths with spaces # Include device types from separate file !include device-types.yaml # Devices Section # Define individual network devices to backup devices: # Core switches (SR Linux) asw100: user: admin # SSH username type: srlinux # Reference to type above asw120: user: netops # Different user per device if needed type: srlinux asw121: user: admin type: srlinux # Distribution switches (Centec) csw150: user: admin type: centec csw151: user: admin type: centec # Edge routers (Arista EOS) edge-01: user: automation type: eos edge-02: user: automation type: eos # Special case: Device with custom commands (overrides type) legacy-router: user: admin commands: - show version - show running-config - show ip route summary # Custom commands specific to this device only # Example using IP address instead of hostname 192.168.1.100: user: operator type: cisco-ios # Configuration Tips: # # 1. Authentication Priority (automatic): # - SSH Agent (if SSH_AUTH_SOCK environment variable is set) # - SSH Key file (--key-file flag or default locations) # - Password (--password flag or interactive prompt) # # 2. Running the backup: # # Backup all devices # ipng-router-backup --config /etc/ipng-router-backup/config.yaml # # # Backup specific devices only # ipng-router-backup --config config.yaml --host asw100 --host edge-01 # # # Custom output directory # ipng-router-backup --config config.yaml --output-dir /backup/$(date +%Y%m%d) # # 3. Output files: # - Named after device hostname (e.g., 'asw100', 'edge-01') # - Each command output prefixed with "## COMMAND: " # - Files are recreated on each run (not appended) # # 4. Security considerations: # - Use SSH keys instead of passwords when possible # - Consider using SSH agent for additional security # - Restrict SSH access to backup user accounts # - Store configuration files with appropriate permissions (640 recommended) # # 5. Error handling: # - If a device is unreachable, the tool continues with other devices # - Check tool output for connection or authentication failures # - Use --host flag to test individual devices