Telegram bot creates MongoDB dump by executing command mongodump and sends it to your chat
/start — force create dump with local db
To restore just send to chat with bot the dump archieve, also you can send it with options in caption
- Clone this repo:
git clone https://github.com/Nrjwolf/backup-mongodb-node-app - Create
.envfile with the environment variables listed below - Run
yarnin the root folder - Run
yarn start
post
/dump — calls mongodump, you can also put options in body
| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN |
Telegram bot token (use @BotFather) |
TELEGRAM_CHAT_TO_LOG |
ID of log chat, you can find it with @userinfobot |
ADMIN_TELEGRAM_ID |
Your admin id (via @userinfobot), only this user can controll bot |
API_KEY |
Bearer token for endpoints usage |
MIT — use for any purpose. Thanks!
