apply suggestion from review

This commit is contained in:
Michael Eischer 2024-01-23 19:09:04 +01:00
parent 767c2539a0
commit 6cc2bec5dd
1 changed files with 10 additions and 9 deletions

View File

@ -1,15 +1,16 @@
Enhancement: Support reading backup from a program's standard output
When reading data from stdin, the `backup` command could not verify whether the
corresponding command completed successfully.
Enhancement: Support reading backup from a commands's standard output
The `backup` command now supports the `--stdin-from-command` option. When using
this option, the arguments to `backup` are interpreted as a command. `backup`
then executes the command and stores its standard output in the backup. This
enables restic to verify that the command completes with exit code zero. A
non-zero exit code causes the backup to fail.
this option, the arguments to `backup` are interpreted as a command instead of
paths to back up. `backup` then executes the given command and stores the
standard output from it in the backup, similar to the what the `--stdin` option
does. This also enables restic to verify that the command completes with exit
code zero. A non-zero exit code causes the backup to fail.
Example: `restic backup --stdin-from-command mysqldump [...]`
Note that the `--stdin` option does not have to be specified at the same time,
and that the `--stdin-filename` option also applies to `--stdin-from-command`.
Example: `restic backup --stdin-from-command --stdin-filename dump.sql mysqldump [...]`
https://github.com/restic/restic/issues/4251
https://github.com/restic/restic/pull/4410