Automated MySQL database backup solution with Telegram delivery
- Once Per Minute(* * * * *)
/usr/bin/php -q /home/CpUser/public_html/Folder/db_backup.php>/dev/null 2>&1
- Twice Per Day(0 0,12 * * *)
/usr/bin/php -q /home/CpUser/public_html/Folder/db_backup.php>/dev/null 2>&1
curl https://example.com/folder/db_backup.php/
- Complete MySQL database backup (structure + data)
- Direct delivery to Telegram (user/channel)
- Clean file management (auto-delete after sending)
- Detailed error logging
- Supports both Gregorian and Jalali dates (commented)
- Secure connection with cURL
- PHP 7.0+ compatible
- Uses MySQLi for database operations
- Telegram Bot API integration
- cURL for secure file transfer
- HTML-formatted captions with GitHub link
jdf.php
- Jalali date functions (included)- Configurable database credentials
- Customizable backup filename format
- Optional logging system
- Connects to MySQL server
- Backs up all tables with structure and data
- Sends SQL file via Telegram bot
- Cleans up temporary files
- Provides detailed operation logs
π
β 2025/05/09 β° β 18:00
βοΈ GitHub