A simple node application for recursively backup your KeePass Database file directly to your telegram built with
If you are using KeePass or KeePassXC this script is simply backup your Database File
to your telegram account, it's will backup your db every week.
Requires Node.js 15.0 or higher download & install for Windows or Linux
All your database backup files will be saved in your bot chat
The following steps describe how to create a new bot:
- Contact
@BotFather
in your Telegram messenger - To get a token, send BotFather a message that says
/newbot
- When asked for a name for your new bot choose something that ends with the word
bot
. For example,my_test_bot
- If your chosen name is available, BotFather will send you a token
- Save the token
Once you've cloned the project and installed dependencies with npm install
(or pnpm install
or yarn
)
- Rename
config.example.json
toconfig.json
and fill your configs :
For the chat_id
Contact @userinfobot
in your Telegram messenger and send a message and it's will send your infos including the chat_id
{
"token": "your bot token",
"apiUrl": "https://api.telegram.org/bot",
"db_path": "your KeePass database file path",
"chat_id": "your chat id"
}
start a development server:
# start the dev server
npm start
Just run this command and accept UAC prompts and it's install as a Windows Service running in the background
npm run install-win
If your want to uninstall the service just run this command:
npm run uninstall-win
Using the forever module package (Requires Node.js to be installed)
npm install forever -g
# start the script
forever start app.js
Ysn4Irix
Copyright © 2022-present, Ysn4Irix. Released under the MIT License.