Skip to content

Virtruvian/ConfigManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aruba CX Configuration Backup Tool

A Docker-based tool for automated backup and management of Aruba CX series switch configurations. This tool provides a web interface to manage switches, perform backups, and view configuration history.

Key Features 🚀 Automated Weekly Backups: Scheduled config, LLDP, and port status backups 🔐 User Authentication: Secure login with admin/user management 🔍 Configuration History: Track changes over time with date-stamped backups 🗑️ Automatic Cleanup: Removes backups older than 6 months 💻 Web Interface: Intuitive GUI for easy management 📦 Docker Containerization: Simple deployment and scalability

Currently supports:

Configuration backups (show running-config) LLDP neighbor information (show lldp neighbors) Port status overview (show interfaces brief) Future plans: Support for additional network equipment brands

Getting Started Prerequisites Docker

Docker Compose

Git

Installation Clone the repository

bash git clone https://github.com/yourusername/aruba-config-backup-tool.git cd aruba-config-backup-tool Build and start the container

bash docker-compose up -d --build Access the web interface Open your browser and go to: http://localhost:5001

Default Credentials Username: admin Password: admin Change these immediately after first login!

Usage Adding Switches Go to the Admin Panel > Switches

Enter switch details:

Name (unique identifier)

IP address

SSH username

SSH password

Performing Backups Automatic: Weekly backups run every Sunday at 3:00 AM

Manual: Click "Trigger Scan" on any switch's detail page

Accessing Backups From the dashboard, click on any switch name

View all available backup files

Click any file to view its contents

Managing Users Go to Admin Panel > Users

Add new users or modify existing ones

Assign admin privileges as needed

Configuration Environment Variables Create a .env file in the project root with the following content:

env SECRET_KEY=your_secret_key_here SQLALCHEMY_DATABASE_URI=sqlite:////app/data/database.db Port Configuration To change the web interface port, modify the docker-compose.yml file:

yaml ports:

  • "YOUR_PORT:5001" Volume Mount Backup files are stored in the ./data directory. Ensure this directory has proper write permissions.

Technical Details Backup Process Connects to Aruba CX switches via SSH

Executes commands:

show running-config

show lldp neighbors

show interfaces brief

Cleans output (removes empty lines and --more-- prompts)

Stores files in directory structure: /data/switches/<switch_name>/

File Naming Convention Files are named with the following pattern:

text <switch_name>-<backup_type>-.txt Example: switch01-config-20230721.txt

Scheduled Tasks Backups run automatically every Sunday at 3:00 AM via APScheduler

Troubleshooting Common Issues SSH Connection Failures:

Verify switch IP, username, and password

Ensure the Docker host can reach the switch

Check if SSH is enabled on the switch

Login Problems:

Reset admin password by running:

bash docker-compose exec web python Then execute:

python from app import create_app from app.models import User from app.db import db

app = create_app() with app.app_context(): admin = User.query.filter_by(username='admin').first() admin.set_password('new_password') db.session.commit() Viewing Logs bash docker-compose logs -f web Contributing We welcome contributions! Please follow these steps:

Fork the repository

Create a new branch (git checkout -b feature/your-feature)

Commit your changes (git commit -am 'Add some feature')

Push to the branch (git push origin feature/your-feature)

Open a pull request

Future Development Planned enhancements:

Support for Cisco, Juniper, and other network devices

Configuration diff viewer

Email notifications for backup failures

Role-based access control (RBAC)

REST API for integration with other tools

License This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments Inspired by network administrators worldwide

Built with Flask, Docker, and Paramiko

Special thanks to the open-source community

About

Config backup manager for Switches.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published