Skip to content

A Telegram bot for backing up MySQL database files with automated scheduling and file delivery.

License

Notifications You must be signed in to change notification settings

Ahmad10611/telegram-backup-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 ربات پشتیبان‌گیری تلگرام - راهنمای خلاصه

توضیحات: این ربات به طور خودکار از دیتابیس MySQL پشتیبان تهیه می‌کند و فایل‌های پشتیبان را از طریق تلگرام ارسال می‌کند. systemd برای مدیریت و اجرای خودکار ربات استفاده می‌شود.


نیازمندی‌ها:

  1. سرور لینوکسی (Ubuntu، Debian، CentOS)
  2. نصب MySQL و Python 3.8+
  3. توکن ربات تلگرام از BotFather
  4. آیدی عددی کاربر مجاز از userinfobot

نصب ربات:

  1. کلون کردن مخزن:

    git clone https://github.com/Ahmad10611/telegram-backup-bot.git
    cd telegram-backup-bot
  2. اجرای اسکریپت نصب:

    chmod +x setup.sh
    ./setup.sh
  3. ورودی‌های لازم:

    • توکن ربات تلگرام از BotFather
    • آیدی عددی کاربر مجاز از userinfobot
    • اطلاعات اتصال MySQL (نام کاربری، رمز عبور، دیتابیس، هاست)

مدیریت ربات:

  • مشاهده لاگ‌ها:

    journalctl -u telegram-backup-bot.service -f
  • توقف ربات:

    systemctl stop telegram-backup-bot
  • راه‌اندازی مجدد ربات:

    systemctl restart telegram-backup-bot
  • حذف ربات:

    systemctl stop telegram-backup-bot
    systemctl disable telegram-backup-bot
    rm /etc/systemd/system/telegram-backup-bot.service
    systemctl daemon-reload
    systemctl reset-failed

🌍 Telegram Backup Bot - Quick Guide

Overview: Automatically backs up MySQL and sends the files via Telegram using systemd for process management.


Requirements:

  1. Linux server (Ubuntu, Debian, CentOS)
  2. MySQL and Python 3.8+
  3. Telegram Bot Token from BotFather
  4. Authorized User ID from userinfobot

Bot Installation:

  1. Clone the repository:

    git clone https://github.com/Ahmad10611/telegram-backup-bot.git
    cd telegram-backup-bot
  2. Run the setup script:

    chmod +x setup.sh
    ./setup.sh
  3. Required inputs:

    • Telegram Bot Token from BotFather
    • Authorized User ID from userinfobot
    • MySQL connection info (username, password, database, host)

Bot Management:

  • View logs:

    journalctl -u telegram-backup-bot.service -f
  • Stop bot:

    systemctl stop telegram-backup-bot
  • Restart bot:

    systemctl restart telegram-backup-bot
  • Remove bot:

    systemctl stop telegram-backup-bot
    systemctl disable telegram-backup-bot
    rm /etc/systemd/system/telegram-backup-bot.service
    systemctl daemon-reload
    systemctl reset-failed

📦 电报备份机器人 - 简要指南

概述: 自动备份 MySQL 并通过 Telegram 发送,使用 systemd 管理进程。


要求:

  1. Linux服务器 (Ubuntu, Debian, CentOS)
  2. MySQL 和 Python 3.8+
  3. Telegram 机器人令牌来自 BotFather
  4. 授权用户ID来自 userinfobot

安装机器人:

  1. 克隆仓库:

    git clone https://github.com/Ahmad10611/telegram-backup-bot.git
    cd telegram-backup-bot
  2. 运行安装脚本:

    chmod +x setup.sh
    ./setup.sh
  3. 输入信息:

    • Telegram 机器人令牌来自 BotFather
    • 授权用户ID来自 userinfobot
    • MySQL 连接信息 (用户名, 密码, 数据库, 主机)

机器人管理:

  • 查看日志:

    journalctl -u telegram-backup-bot.service -f
  • 停止机器人:

    systemctl stop telegram-backup-bot
  • 重启机器人:

    systemctl restart telegram-backup-bot
  • 删除机器人:

    systemctl stop telegram-backup-bot
    systemctl disable telegram-backup-bot
    rm /etc/systemd/system/telegram-backup-bot.service
    systemctl daemon-reload
    systemctl reset-failed

About

A Telegram bot for backing up MySQL database files with automated scheduling and file delivery.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published