I discovered Kopia a few months ago and loved it, however there was one limitation that prevented me from switching over. I wanted to be proactively notified, by email, when something went wrong. I hoped it would be added to Kopia itself but seeing that it wasn’t I decided to write a small Python program to do exactly that. The program is designed to run on a schedule, and send an email report with all recent tasks or only with errors.
The program is creatively called kopia-mon and it has the following features:
Send an email status report about all the tasks that executed since the last time the program ran.
Option to send the email only if there was an error.
Monitor for inactivity, to identify cases when the backups stopped running.
It was designed to run on the client because of of its features is to only alert on missed backups if there were actually changes on the filesystem that needed to be backed up. It may work on the server too if you have the kopia profile files there but I didn’t test it for that scenario. Except for the above mentioned feature it’s just running the kopia command line and parsing the output.
Hello,
this alerting tool is something absolutely necessary for using Kopia.
Thanks for implementing it!
However, I can’t install and configure it properly.
I’ve read https://github.com/ekutner/kopia-mon/blob/master/README.md.
Then I’ve read https://github.com/ekutner/kopia-mon/issues/8, as I had a similar issue (i.e.: “error: subprocess-exited-with-error”); in my case I apparently solved this by using the following commands:
In few words, I executed:
The error is right there, it can’t find its config file. You should either have it in the working directory or specify the path the the -c parameter. See the instructions in the README.
Thanks for your help…
Following your suggestion, now I’ve been able to launch:
python.exe kopia-mon.py
without errors.
However, no mail is sent… Simply, in the CMD window, I don’t get errors, but also I don’t get any warning of information. I attach the screenshot.
Consider that:
I tried to send an e-mail with my mail client, putting in “From:” and in “To:” the mail addresses I put in the file “config.yaml”, and using the same password, and it worked.
It’s better to open an issue in github (Issues · ekutner/kopia-mon · GitHub) so I can track it.
You can start by adding the --no-send-email parameter and see if you get the report in the console. If you do then it’s probably a problem with sending the email and we’ll have to troubleshoot it.