commands before/after succesfull completion #17
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#17
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It would be nice to be able to execute some script before and after the backup
like getting contacts from dav-server, ...
Imported from Taiga issue 16 (done). Created on 2015-12-19T11:40:01+0000 by stunkymonkey.
in my case:
every time i make an backup i wrote the time to a file.
i also got an cron task which checks when the last backup was and makes a notify-send if my backup is older then one week.
so this would be pretty usefull
Comment on 2015-12-20T22:06:19+0000 by stunkymonkey.
If you're invoking atticmatic with cron, then I think you would be able to accomplish what you're talking about directly in your crontab. For instance, if your cron entry looks something like this today...
.. then you might be able to just add something like this to do some action after the backup succeeds:
Similar idea if you want to run some command before the backup begins:
Does that work for your use cases?
Comment on 2015-12-20T23:27:47+0000 by Dan Helfman.
at the moment this is my solution.
I just wondered if you plan to support it in any way
Comment on 2015-12-21T13:21:04+0000 by stunkymonkey.
That seems like a reasonable feature to add. I just wanted to make sure you had a work-around in the meantime. Thanks for the suggestion!
Comment on 2015-12-24T03:57:19+0000 by Dan Helfman.
+1 For this features.
Comment on 2016-07-03T10:03:52+0000 by s200999900.
I am using systemd to run borgmatic, and just realized that the lock.exclusive folder was left behind from a previous failed backup, and this prevented future backups from running. I had mistakenly assumed that my backups were being taken, but until checking manually, I discovered the opposite. It would be great to have borgmatic send an e-mail, or at the least, write to a logfile. +1 for this feature big time. Thanks for borgmatic regardless!
Comment on 2016-10-18T03:31:34+0000 by George Merlocco.
This has been implemented! Check out borgmatic 1.1.9, just released. There's a new "hooks" section in the configuration file.. Generate a sample file to check it out.
Comment on 2017-10-30T03:35:20+0000 by Dan Helfman.