Skip to content

abcdefak87/mikrotik-auto-backup-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MikroTik Auto Backup Bot 🤖📦

Telegram bot untuk backup konfigurasi MikroTik secara otomatis via SSH.

✨ Fitur

  • Scheduled Backup - Backup otomatis dengan cron schedule (default: setiap hari pukul 18:00)
  • 📬 Telegram Notification - Notifikasi status backup langsung ke Telegram
  • 🔐 SSH Secure - Koneksi SSH encrypted ke MikroTik
  • 💾 Auto Storage - Backup file disimpan dengan timestamp
  • 🔄 Retry Logic - Auto retry jika backup gagal
  • 📊 Manual Trigger - Bisa trigger backup manual via Telegram command

🚀 Quick Start

1. Clone & Install

git clone https://github.com/abcdefak87/mikrotik-auto-backup-bot.git
cd mikrotik-auto-backup-bot
npm install

2. Configure

Copy .env.example ke .env dan isi:

cp env.example .env

Edit .env:

# Telegram Bot
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id

# MikroTik
MIKROTIK_HOST=192.168.88.1
MIKROTIK_USER=admin
MIKROTIK_PASSWORD=your_password
MIKROTIK_PORT=22

# Backup Schedule (cron format)
BACKUP_SCHEDULE=0 18 * * *

3. Run

npm start

📁 Project Structure

mikrotik-auto-backup-bot/
├── src/
│   └── index.js          # Main bot code
├── data/                  # Backup storage
├── .env                  # Environment config
├── .env.example          # Template config
├── package.json
└── README.md

🛠️ Tech Stack

  • Node.js - Runtime
  • node-telegram-bot-api - Telegram bot framework
  • ssh2 - SSH connection
  • node-cron - Job scheduling
  • dotenv - Environment management

📄 License

MIT License - see LICENSE for details.


Made with ❤️ by Sanex

About

Telegram bot untuk backup konfigurasi MikroTik otomatis via SSH

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors