Open Luzifer opened 8 years ago
You're right, this would be a very useful enhancement. Not sure I will be able to look into implementing it soon. Anyone feel free to propose a pull request before I do :wink:
Regarding the second expected behavior, the script does send an email but not the other notification methods (e.g. slack). @zertrin, maybe we should simply add send_notification
next to email_logfile
at https://github.com/zertrin/duplicity-backup/blob/b92d60f028dffb94dc3aff2cd674dce4d5a9f48c/duplicity-backup.sh#L436?
Actually there 10 appearances of exit
in the script, maybe they should be replaced by some notificiation-sending function? (at least if the configuration was correct enough to set it up).
I fully agree. I'll look into this soon sometime since that's easier.
@zertrin
I did just what @jarondl suggested above and nothing more. I have two enhancements in mind:
I let those two for later. However, regarding item 1 I don´t figured out the best way to do this, I think it may require a refactoring of send_notification
in order to accept some optional parameter. Any thoughts?
How do you deal with rebooting the server you're backing up? Each time that I do, it's halfway through the last backup causing it to never start back up since the lockfile still exists.
It doesn't happen to me since my backup doesn't last that long and I'm never rebooting around the time where my backup is running.
Locking mechanisms are hard to get right and can be annoying. Still didn't found the time to implement a solution, but I welcome contributions that aim at doing locking "the right way" (probably with a PID check somewhere).
Observed behavior
lock held by XXXX
Expected behavior
OR
Logs