A robust automated backup solution for X-UI databases with Telegram integration. This system consists of two components: a Download Server (Foreign) and an Upload Server (Iranian), working together to securely transfer and backup your X-UI database files.
bash <(curl -Ls https://raw.githubusercontent.com/yoyoraya/xui-backup/master/install.sh)
- Automated Backups: Scheduled database backups at customizable intervals
- Secure File Transfer: API key authentication for secure server communication
- Telegram Integration: Instant notifications with detailed backup information
- Rate Limiting: Built-in protection against abuse
- Logging: Comprehensive logging system for troubleshooting
- Easy Management: Simple installation and configuration process
- Python 3.x
- Flask
- Flask-Limiter
- Requests
- Systemd-compatible Linux system
- Python 3.x
- Requests
- Cron (for scheduling)
- Systemd-compatible Linux system
# Run the script and select option 1
# You will need to provide:
- Telegram Bot Token
- Telegram Chat ID
# Run the script and select option 2
# You will need to provide:
- Download Server IP
- API Key (generated during Download Server setup)
- Backup frequency (in hours)
- Maximum file size: 16MB
- Allowed file types: .db
- Rate limit: 5 requests per minute
- Port: 5000
- Automated backups via cron
- Systemd service for reliability
- Configurable backup frequency
- API Key Authentication
- Rate Limiting
- File Type Validation
- Secure File Handling
- Automatic File Cleanup
Each backup notification includes:
- Host Name
- Host IP
- Date and Time
- Database File
# Run the script and select option 3
# Update bot token and chat ID
# Run the script and select option 4
# Removes all components and configurations
- Download Server:
server.log
- Upload Server:
client.log
- Systemd journal logs available via
journalctl
- Keep your API key secure
- Store backup copies in multiple locations
- Regularly verify backup integrity
- Monitor system logs for any issues
- Ensure stable network connectivity
-
Check system logs:
journalctl -u dl.service # Download server logs journalctl -u up.service # Upload server logs
-
Verify service status:
systemctl status dl.service systemctl status up.service
-
Common issues:
- Network connectivity problems
- Invalid API key
- File permission issues
- Telegram bot configuration errors
For issues and feature requests, please contact the system administrator or create an issue in the repository.
- Use strong API keys
- Regular security audits
- Keep systems updated
- Monitor access logs
- Implement firewall rules