Closed fancsali closed 3 years ago
What have you tried so far? Given the correct config file (no arguments that conflict with --stdin
) I believe it should just work...
Indeed, it doesn't. What I meant, is that it might be a bit error-prone, to configure things in two places:
Once in /etc/crestic.cfg
:
[mysql]
repo: ...
keep-daily: ...
...
And then a custom systemd unit for this.
So, I had the idea, to provide a method of inserting something at the very beginning of the assembled command line.
Hm, can you please give a reproducible example and the error message you are seeing?
So, I had the idea, to provide a method of inserting something at the very beginning of the assembled command line.
Or did you mean you want the mysql-dump --all-databases |
part created by crestic
?
So, I had the idea, to provide a method of inserting something at the very beginning of the assembled command line.
Or did you mean you want the
mysql-dump --all-databases |
part created bycrestic
?
Well, "want" is a very strong word here, but yes, I am proposing that might be a nice feature... 😉
Ah, I see. That is a shell feature and therefore probably out of scope for crestic
, when all you need to do is
mysql-dump --all-databases | crestic mysql backup
with a config file
[mysql.backup]
stdin:
stdin-filename: mysql-all.sql
Well, it might be out of scope; it just occured to me.
A solution around it is to make 2 systemd templates, one for when there's a command to pipe, and one for "standard" invocation.
One of the very nice, and convenient features of
restic
is, that one can do a backup for the output of a command, like:(See https://restic.readthedocs.io/en/latest/040_backup.html#reading-data-from-stdin)
It would be brilliant, if
crestic
would be able to build such commands as well.