r/rclone • • Jul 04 '21

Python Rclone Backup Script with Telegram, InfluxDB and Grafana Reporting

Hey guys :)

I created a small Python Rclone Backup Script for personal use. I wanted to step up my Rclone game and get statistics and backup summaries in Telegram and Grafana.

You can find the script here: https://gist.github.com/lucanello/1fa285804dff2eeb681d3a86f64cc03b

Grab the Grafana dashboard from here: https://grafana.com/grafana/dashboards/14686

I use the Python subprocess.run() command to execute the rclone commands.

Features:

  • You can execute scripts, commands and database dumps before running a single rclone command

  • It sends automatic error reports and summaries

  • It saves all statistics and operations to an Influx database

  • The data can be used for visualizations in e.g. Grafana

  • You can automate it by using cron

Examples:

Please leave some feedback and help me improve this script! :-)

Thanks and have fun!

41 Upvotes

9 comments sorted by

View all comments

1

u/PovilasID Jul 14 '23

Have you considered packaging it into a docker container?

Would it work as conatainer?