Add HTTPS storage support
This commit is contained in:
parent
efc942c041
commit
6f6a82153a
@ -11,6 +11,7 @@ backup_path="${BACKUP_DEST:?BACKUP_DEST not set}"
|
|||||||
# shellcheck disable=SC2153
|
# shellcheck disable=SC2153
|
||||||
ssh_key_file="${SSH_KEY_FILE}"
|
ssh_key_file="${SSH_KEY_FILE}"
|
||||||
s3_key_file="${AWS_SECRET_ACCESS_KEY_FILE}"
|
s3_key_file="${AWS_SECRET_ACCESS_KEY_FILE}"
|
||||||
|
https_password_file="${HTTPS_PASSWORD_FILE}"
|
||||||
|
|
||||||
restic_repo=
|
restic_repo=
|
||||||
restic_extra_options=
|
restic_extra_options=
|
||||||
@ -39,8 +40,14 @@ if [ -n "$s3_key_file" ] && [ -f "$s3_key_file" ] && [ -n "$AWS_ACCESS_KEY_ID" ]
|
|||||||
restic_repo="s3:$restic_host:/$server_name"
|
restic_repo="s3:$restic_host:/$server_name"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$https_password_file" ] && [ -f "$https_password_file" ]; then
|
||||||
|
RESTIC_PASSWORD="$(cat "${https_password_file}")"
|
||||||
|
export RESTIC_PASSWORD
|
||||||
|
restic_repo="rest:$restic_host"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$restic_repo" ]; then
|
if [ -z "$restic_repo" ]; then
|
||||||
echo "you must configure either SFTP or S3 storage, see README"
|
echo "you must configure either SFTP, S3, or HTTPS storage, see README"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user