2023-01-08 14:34:30 +00:00
|
|
|
Bugfix: Don't read password from stdin for `backup --stdin`
|
2022-11-06 13:38:34 +00:00
|
|
|
|
2023-01-08 14:34:30 +00:00
|
|
|
The `backup` command when used with `--stdin` previously tried to read first
|
|
|
|
the password, then the data to be backed up from standard input. This meant
|
|
|
|
it would often confuse part of the data for the password.
|
2022-11-06 13:38:34 +00:00
|
|
|
|
2023-01-08 14:34:30 +00:00
|
|
|
From now on, it will instead exit with the message `Fatal: cannot read both
|
|
|
|
password and data from stdin` unless the password is passed in some other
|
|
|
|
way (such as `--restic-password-file`, `RESTIC_PASSWORD`, etc).
|
2022-11-06 13:38:34 +00:00
|
|
|
|
2023-01-08 14:34:30 +00:00
|
|
|
To enter the password interactively a password command has to be used. For
|
|
|
|
example on Linux, `mysqldump somedatabase | restic backup --stdin
|
|
|
|
--password-command='sh -c "systemd-ask-password < /dev/tty"'` securely reads
|
|
|
|
the password from the terminal.
|
2022-11-06 13:38:34 +00:00
|
|
|
|
|
|
|
https://github.com/restic/restic/issues/2591
|
|
|
|
https://github.com/restic/restic/pull/4011
|