borg has support for piped input, great for mysqldump, but I don’t see a way to configure with borgmatic.
Imported from Taiga issue 41 (to do). Created on 2017-09-08T13:41:37+0000 by asdfasdfoaijsdf.
I’m not familiar with this feature, but that doesn’t mean it’s not a great idea. :) Could you tell me a little more about how you use piped input and why you use it? Maybe give an example with Borg?
Comment on 2017-09-09T04:04:23+0000 by Dan Helfman.
Here’s the documentation on the feature in borg
I got the idea from a similar backup program called restic:
I use it pretty much exactly as in the example of restic, to pipe the output of mysqldump directly into a borg repo.
Comment on 2017-09-09T11:12:36+0000 by jorisjh.
Got it, thanks. That makes sense.. I can envision two different ways that borgmatic could implement that feature:
mysqldump | borgmatic --stdin
The second option would have some challenges, in that it’d be unclear which of the multiple borgmatic config files should consume that stdin. Like, if you’ve got five borgmatic config files and thus five Borg repositories, you probably only want that stdin to go to one of them. So that might mean option one is a more natural fit.
Comment on 2017-09-09T17:01:44+0000 by Dan Helfman.
Now that borgmatic has a hooks system in place, option number 1 may be doable with a hook. For instance, there could be a new backup_input hook that runs an arbitrary command and pipes its output to Borg’s stdin pretty easily.
Support for the borg create --stdin-name flag might also be nice to have.
borg create --stdin-name
I just wanted to say that I’m interested in this feature 🙂
Wow, it looks like this might “just work”. I tried adding a borgmatic source directory of "-" (with quotes) in the config file to indicate stdin. Then I was able to pipe input in via the command-line:
echo "hi" | borgmatic --create
I did an extract and confirmed that a file named “stdin” with those contents was extracted.
So, work still to-do before calling this feature done:
No due date set.
This issue currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?