How lucas-linzl/netbackup works
netbackup is a command-line tool for bulk network-device configuration backups and health inspections. The user supplies a CSV, YAML, or JSON device inventory and selects backup, inspection, or both. The main entry point validates options, parses devices, and dispatches per-device work concurrently. Backup and inspection engines connect over SSH, run device-specific commands with retries, and save results; inspection additionally loads built-in or custom command templates and generates Markdown or HTML reports. The README documents these capabilities; sampled excerpts do not establish every internal call, so uncertain links are omitted.
Main entry points: main.py Workflow · inspect_engine.py Inspection engine · backup_engine.py Backup engine · file_manager.py File manager
Components 14
CLI and orchestration
- CLI config
netbackup/cli.py - Workflow
netbackup/main.py - Inventory parser
netbackup/config_parser.py - Task concurrency
netbackup/concurrency.py
Device operations
- Backup engine
netbackup/backup_engine.py - Inspection engine
netbackup/inspect_engine.py - Command templates
netbackup/inspect_templates.py - SSH connector
netbackup/connector.py
Results and reporting
- File manager
netbackup/file_manager.py - Report generator
netbackup/report_generator.py
Shared infrastructure
- Logging
netbackup/logger.py
Other components
- Operator
- Netmiko SSH
- Output files
Connections 19
- Operator → CLI config: provides options
- CLI config → Workflow: builds config
- Workflow → Inventory parser: parses inventory
- Workflow → Task concurrency: dispatches tasks
- Task concurrency → Backup engine: runs backup
- Task concurrency → Inspection engine: runs inspection
- Workflow → Backup engine: initializes engine
- Workflow → Inspection engine: initializes engine
- Workflow → Command templates: loads templates
- Backup engine → SSH connector: connects and commands
- Inspection engine → SSH connector: connects and commands
- SSH connector → Netmiko SSH: SSH transport
- Inspection engine → Command templates: gets commands
- Backup engine → File manager: saves configs
- Inspection engine → File manager: saves results
- Workflow → Report generator: generates report
- Report generator → File manager: saves report
- File manager → Output files: writes outputs
- Workflow → Logging: sets up logging