# malmukhtar/network-devices-backup architecture

> Architecture diagram of the GitHub repository malmukhtar/network-devices-backup, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/malmukhtar/network-devices-backup
- Repository: https://github.com/malmukhtar/network-devices-backup

## Overview

##### Project type and purpose
- This is a small Python-based automation tool (“Network-Devices-Backup”) that reads a list of network devices from an Excel spreadsheet, uses Paramiko (SSH) to connect to each device, retrieves its running configuration, and stores that backup to a file system path. It can be run manually or scheduled as a recurring task.

##### File structure
- Top-level files:
- .gitignore – ignore patterns for version control
- LICENSE – project license
- README.md – project description and usage
- APP/Backup.py – the sole Python script containing the logic to:
- Parse credentials and file paths (usernames, passwords, enable password)
- Read device records from Devices/DevicesAll.xlsx via pandas
- SSH into devices via Paramiko
- Retrieve and write configuration backups
- Devices/DevicesAll.xlsx – the master list of target network devices

##### README for additional insights
- Dependencies: paramiko (for SSH) and pandas (for Excel processing)
- Usage: configure credential variables in the script, optionally schedule via OS task scheduler

## Diagram (Mermaid)

```mermaid
flowchart TD
    Scheduler["Scheduler\n(cron/Task Scheduler)"]:::external
    Backup["Backup.py\n(Python Script)"]:::app
    Pandas["pandas\n(Excel I/O)"]:::library
    Paramiko["Paramiko\n(SSH client)"]:::library
    Devices["DevicesAll.xlsx\n(Device List)"]:::datastore
    NetDevices["Network Devices\n(Routers/Switches)"]:::external
    Storage["Backup Storage\n(Config Files)"]:::datastore

    subgraph Documentation
        README["README.md"]:::doc
        GITIGNORE[".gitignore"]:::doc
        LICENSEF["LICENSE"]:::doc
    end

    Scheduler -->|"invoke"| Backup
    Backup -->|"read list"| Devices
    Backup -->|"open SSH sessions"| NetDevices
    Backup -->|"write backups"| Storage
    Backup -->|"uses"| Pandas
    Backup -->|"uses"| Paramiko

    click Backup "https://github.com/malmukhtar/network-devices-backup/blob/master/APP/Backup.py"
    click Devices "https://github.com/malmukhtar/network-devices-backup/blob/master/Devices/DevicesAll.xlsx"
    click README "https://github.com/malmukhtar/network-devices-backup/blob/master/README.md"
    click GITIGNORE "https://github.com/malmukhtar/network-devices-backup/blob/master/.gitignore"
    click LICENSEF "https://github.com/malmukhtar/network-devices-backup/tree/master/LICENSE"

    classDef external fill:#f9f,stroke:#333,stroke-width:1px;
    classDef app fill:#bbf,stroke:#333,stroke-width:1px;
    classDef library fill:#bfb,stroke:#333,stroke-width:1px;
    classDef datastore fill:#ffb,stroke:#333,stroke-width:1px;
    classDef doc fill:#eee,stroke:#333,stroke-width:1px;
```
