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

2

u/rafaelreisr Jul 06 '21

I wonder if you could add to the gist the json for the Grafana dash. Saves a lot of time creating all those graphs

1

u/lucanello Jul 06 '21 edited Jul 06 '21

Of course :) I've updated the gist with the exported Grafana .json file

And you can also get the .json from Grafana: https://grafana.com/grafana/dashboards/14686