๐ Professional MikroTik Router Backup Management System
A powerful, web-based backup management application designed for ISP and office environments. Built with modern web technologies to provide comprehensive router backup automation, scheduling, and monitoring capabilities.
- โจ Features
- ๐ Quick Start
- ๐ Usage Guide
- ๐ฏ Supported Router Types
- ๐ป Technology Stack
- ๐ Project Structure
- ๐ง Configuration
- ๐ข Deployment
- ๐ค Contributing
- ๐ Changelog
- ๐ Troubleshooting
- ๐ Support
- ๐ License
- ๐ Multiple Router Management: Add, configure, and manage multiple MikroTik routers
- โก One-Click Backup: Trigger backups instantly and download files automatically
- ๐ Connection Testing: Test router connectivity before adding to system
- ๐ Real-time Monitoring: Live status indicators for all managed routers
- ๐ฑ Responsive Interface: Optimized for desktop, tablet, and mobile devices
- ๐พ Automated Backups: Schedule automatic backups with flexible timing
- ๐ Backup Types: Support for full system and configuration-only backups
- ๐๏ธ File Organization: Automatic file naming and organized storage
- ๐ฅ Download Management: Easy access to all backup files
- ๐งน Cleanup Automation: Automatic removal of old backup files
- ๐ซ Modern UI/UX: Clean, professional design with intuitive navigation
- ๐ Dark/Light Theme: Adaptive theming for comfortable viewing
- ๐ Interactive Dashboard: Real-time statistics and system overview
- ๐ฏ Drag & Drop: Seamless router configuration experience
- โณ Progress Indicators: Real-time feedback during backup operations
- ๐ Secure Connections: SSL/TLS support for router communications
- ๐ ๏ธ Error Handling: Comprehensive error reporting and recovery
- โก Performance Optimized: Efficient processing for multiple routers
- ๐ Credential Management: Secure storage of router credentials
- ๐ Cross-Platform: Compatible with Windows, macOS, and Linux
- Python 3.8+ ๐
- Modern web browser ๐
- MikroTik RouterOS 6.0+ ๐ก
- 100MB+ free disk space ๐พ
# Clone the repository
git clone https://github.com/rezaworks/mikrotik-backup-tool.git
cd mikrotik-backup-tool
# Create virtual environment
python -m venv mikrotik_backup_venv
source mikrotik_backup_venv/bin/activate # Windows: mikrotik_backup_venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Launch application
python backend/app.py
# Open browser and navigate to:
# http://localhost:5000
# Build Docker image
docker build -t mikrotik-backup-tool .
# Run container
docker run -p 5000:5000 mikrotik-backup-tool
# Access at: http://localhost:5000
# Using Gunicorn (Recommended for production)
pip install gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 backend.app:app
# Access at: http://your-server:5000
- ๐ง Access Router Management: Click "Add Router" from the main dashboard
- ๐ Enter Router Details: Provide name, IP address, credentials
- ๐ Test Connection: Verify router connectivity and API access
- ๐พ Save Configuration: Store router for future backup operations
- ๐ฏ Select Target Router: Choose from configured routers list
- โ๏ธ Choose Backup Type: Select full system or configuration backup
โถ๏ธ Initiate Backup: Click "Backup Now" to start the process- ๐ฅ Download File: Automatically download the backup file
- ๐ View Dashboard: Monitor all routers status in real-time
- ๐ Check Logs: Review backup history and system events
- โ๏ธ Manage Schedules: Configure automated backup schedules
- ๐งน Cleanup: Remove old backup files automatically
- ๐ Automatic Organization: Backups organized by router and date
- ๐ฅ Easy Downloads: Direct download links for all backup files
- ๐๏ธ Format Support: Both full (.backup) and config (.rsc) formats
- ๐ Metadata Tracking: File size, creation date, and router information
Router Type | Description | Features |
---|---|---|
๐ก MikroTik RouterOS | All RouterBOARD devices | Full API integration |
๐ CCR Series | Cloud Core Routers | High-performance backups |
๐ hAP Series | Home Access Point | Wireless configuration backup |
๐ข RB Series | General purpose routers | Complete system backup |
๐ RB1100AHx4 | Enterprise routers | Advanced configuration management |
- ๐ API Connection: Direct RouterOS API communication
- ๐ SSL/TLS Support: Secure encrypted connections
- ๐ Authentication: Username/password and key-based auth
- ๐ Status Monitoring: Real-time connection health checks
- ๐ Flask: Web framework for Python backend
- ๐๏ธ Flask-SQLAlchemy: Database ORM for router management
- ๐ librouteros: MikroTik RouterOS API communication
- ๐ paramiko: SSH/SFTP for secure file transfers
- โฐ schedule: Background job scheduling
- ๐ flask-cors: Cross-origin resource sharing
mikrotik-backup-tool/
โโโ ๐ backend/ # ๐ง Backend Python application
โ โโโ app.py # ๐ Main Flask application
โ โโโ models.py # ๐พ Database models and schemas
โ โโโ utils/ # ๐ง Utility modules
โ โ โโโ mikrotik.py # ๐ก MikroTik communication utilities
โ โ โโโ scheduler.py # โฐ Backup scheduling logic
โ โโโ config.db # ๐พ SQLite database (auto-created)
โโโ ๐ public/ # ๐ Frontend assets
โ โโโ index.html # ๐ Main web interface
โ โโโ style.css # ๐จ Application styling
โ โโโ script.js # โก Frontend functionality
โ โโโ assets/ # ๐ผ๏ธ Static assets
โ โโโ logo.svg # ๐ท๏ธ Application logo
โ โโโ icons/ # ๐ฒ UI icons
โโโ ๐ backups/ # ๐พ Backup storage directory
โโโ ๐ requirements.txt # ๐ฆ Python dependencies
โโโ ๐ README.md # ๐ Project documentation
โโโ ๐ LICENSE # ๐ MIT license file
โโโ ๐ .gitignore # ๐ซ Git ignore patterns
โโโ ๐ setup.py # ๐ฆ Package configuration
โโโ ๐ venv/ # ๐ Python virtual environment
# Default Configuration (backend/app.py)
PORT = 5000
BACKUP_DIR = 'backups/'
DATABASE_URL = 'sqlite:///backend/config.db'
SECRET_KEY = 'your-secret-key-here' # Change in production
Each router requires the following information:
- Name: Friendly identifier (e.g., "Office-Firewall")
- Host: IP address or hostname (e.g., "192.168.1.1")
- Username: RouterOS login username (default: "admin")
- Password: RouterOS login password
- Port: API port (default: 8728)
- SSL: Enable/disable SSL encryption
export FLASK_ENV=production
export SECRET_KEY=your-production-secret
export BACKUP_DIR=/path/to/backups
export DATABASE_URL=sqlite:///path/to/database.db
# Using Flask development server
python backend/app.py
# Access at: http://localhost:5000
# Install Gunicorn
pip install gunicorn
# Run with multiple workers
gunicorn -w 4 -b 0.0.0.0:5000 backend.app:app
# Access at: http://your-server:5000
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["python", "backend/app.py"]
# Build and run
docker build -t mikrotik-backup-tool .
docker run -p 5000:5000 mikrotik-backup-tool
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
We welcome contributions from the community! ๐
- ๐ด Fork the repository
- ๐ฟ Create a feature branch:
git checkout -b feature/amazing-feature
- ๐ป Make your changes
- โ Test thoroughly
- ๐ค Submit a pull request
- ๐ Follow PEP 8 style guidelines for Python code
- ๐งช Write comprehensive tests for new features
- ๐ Update documentation for API changes
- ๐ฑ Ensure responsive design for UI modifications
- ๐ Maintain backward compatibility when possible
- ๐ง New Router Support: Additional RouterOS versions or device types
- ๐ Enhanced Analytics: New monitoring and reporting features
- โก Performance Improvements: Backup speed and efficiency
- ๐ซ UI/UX Enhancements: Accessibility, mobile optimization
- ๐งช Testing: Unit tests, integration tests, performance benchmarks
- โจ Initial release with core backup functionality
- ๐ Complete MikroTik RouterOS API integration
- ๐ฑ Modern responsive web interface
- ๐ฆ Support for full system and configuration backups
- ๐ Real-time status monitoring and alerts
- โฐ Advanced scheduling with cron expressions
- ๐ง Email notifications for backup completion/failure
- ๐ Advanced reporting and analytics dashboard
- ๐ REST API for third-party integrations
- โ๏ธ Cloud storage integration (AWS S3, Google Cloud)
Problem | Solution |
---|---|
Router connection failed | Verify IP address, credentials, and API access |
Backup process hangs | Check router resources and network connectivity |
File download fails | Verify disk space and file permissions |
Web interface not loading | Confirm Flask is running on correct port |
- ๐ Check this README thoroughly
- ๐ Search existing GitHub issues
- ๐ฌ Create a new issue with detailed information
- ๐ง Contact: work.rezaul@outlook.com
- ๐ง Email: work.rezaul@outlook.com
- ๐ Issues: Create a GitHub issue
- ๐ญ Discussions: GitHub Discussions
- โญ Star this project if you find it helpful
- ๐ Report bugs to help improve the tool
- ๐ก Suggest features for future releases
- ๐ Share with others who might benefit
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2023 REZ LAB
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Rezaul Karim
๐ข REZ LAB
Built with โค๏ธ for MikroTik administrators and ISP professionals
โญ If you find this project helpful, please give it a star!
โจ Features โข ๐ Quick Start โข ๐ Usage โข ๐ค Contribute