Skip to content

cobrich/netcfg-backup

Repository files navigation

🌐 Netcfg Backup

A production-ready network configuration backup system featuring a Web UI, CLI, concurrent backups, and a full observability stack.

Go Report Card License: MIT

netcfg-backup provides a user-friendly web interface to manage network devices, execute configuration backups on demand, browse backup history, and monitor system performance using Prometheus and Grafana.

The project also includes a powerful command-line interface for scripting and automation.


✨ Key Features

  • Web Interface

    • Device inventory management (CRUD)
    • Run backups on demand
    • Browse historical backup files
  • Command-Line Interface

    • Add, edit, list and remove devices
    • Execute configuration backups
    • Run remote commands
    • Migrate legacy device inventories
  • Concurrent Worker Pool

    • Parallel backup execution
    • Efficient processing of multiple devices
  • Persistent Storage

    • SQLite database
  • Built-in Monitoring

    • Prometheus metrics
    • Grafana dashboards
  • Multi-Protocol Support

    • SSH
    • Telnet
  • Docker Ready

    • Complete monitoring stack with Docker Compose

🏗️ Architecture

            Web UI / CLI
                 │
                 ▼
         Backup Service
                 │
          Concurrent Worker Pool
                 │
          SSH / Telnet Connectors
                 │
          Network Devices
                 │
           SQLite Storage
                 │
        Prometheus Metrics
                 │
        Grafana Dashboards

🚀 Engineering Highlights

  • Concurrent worker pool for parallel backups
  • SSH and Telnet connectors
  • Web UI and CLI interfaces
  • SQLite persistence layer
  • Prometheus metrics
  • Grafana dashboards
  • Dockerized deployment
  • Device inventory management
  • Backup history browser
  • Configuration migration tool

📚 Lessons Learned

Building Netcfg Backup helped me improve:

  • Concurrent programming in Go
  • Worker pool implementation
  • SSH/Telnet automation
  • Network device management
  • Prometheus monitoring
  • Grafana dashboards
  • CLI application development
  • HTTP server development
  • Docker deployment

⚡ Getting Started

Prerequisites

  • Go 1.24+
  • Docker & Docker Compose
  • Git

Clone the repository

git clone https://github.com/cobrich/netcfg-backup.git
cd netcfg-backup

Configure environment

cp .env.example .env

Update the .env file and configure your secrets (including SESSION_AUTH_KEY).

Run the full stack

docker compose up --build

Open the Web UI:

http://localhost:8080

💻 Usage

Web Interface

Page Description
/ Device management
/backups Browse backup history
Run Backup Execute backup for all configured devices

Monitoring

Service URL
Prometheus http://localhost:9091
Grafana http://localhost:3000

Default Grafana credentials:

admin / admin

CLI

Build:

go build -o netcfg-backup .

Available commands:

netcfg-backup server
netcfg-backup run
netcfg-backup list
netcfg-backup add
netcfg-backup edit
netcfg-backup remove
netcfg-backup exec
netcfg-backup migrate

For more information:

netcfg-backup --help

🗺️ Roadmap

  • Web UI
  • CLI
  • SSH support
  • Telnet support
  • SQLite storage
  • Concurrent worker pool
  • Prometheus metrics
  • Grafana dashboards
  • Docker support
  • Automatic scheduled backups
  • Email notifications
  • Multi-user authentication

📄 License

This project is licensed under the MIT License.


👨‍💻 Author

Bekzat Tursun

GitHub: https://github.com/cobrich

About

Production-ready network configuration backup system built with Go, featuring Web UI, CLI, SSH/Telnet support, SQLite, Prometheus, Grafana, and Docker.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors