Skip to content

Script to receive telegram notifications about Duplicati backup results

License

Notifications You must be signed in to change notification settings

oxystin/duplicati-notify-to-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Duplicati Notify to Telegram

GitHub all releases GitHub pull requests GitHub issues

Script for receiving notifications in telegram about the results of Duplicati backup

Installation:

Duplicati is able to run scripts before and after backups. This functionality is available in the advanced options of any backup job (UI) oras option (CLI). The (advanced) options to run scripts are
--run-script-before = /script/notify_to_telegram.sh
--run-script-after = /script/notify_to_telegram.sh

To work, you need to set two required variables:

  • TELEGRAM_TOKEN
  • TELEGRAM_CHATID

These variables can be set directly in the script file or set as environment variables. If you are using docker you can use the following example to automatically install the script in the /script/notify_to_telegram.sh folder and set the environment variables:

version: "3"
services:
  duplicati:
    image: linuxserver/duplicati:2.0.6
    container_name: duplicati
    entrypoint: >
          sh -c "mkdir -p /script &&
          if [ ! -f /script/notify_to_telegram.sh ]; then
            curl -s `printenv SCRIPT_URL` -o /script/notify_to_telegram.sh
          fi &&
          chown -R 1000:1000 /script &&
          chmod -R 744 /script && 
          /init"
    environment:
      - PUID=0
      - PGID=0
      - TZ=Europe/Berlin
      - TELEGRAM_TOKEN=<YOUR TELEGRAM TOKEN>
      - TELEGRAM_CHATID=<YOUR TELEGRAM CHAT ID>
      - SCRIPT_URL=https://raw.githubusercontent.com/oxystin/duplicati-notify-to-telegram/main/notify_to_telegram.sh
    volumes:
      - </path/to/config>:/config
      - </path/to/script>:/script
      - </path/to/backups>:/backups
      - </path/to/source>:/source
    ports:
      - 8200:8200
    restart: unless-stopped

About

Script to receive telegram notifications about Duplicati backup results

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages