Load Restic credentials from ~/.restic-env in backup/restore scripts
This commit is contained in:
@@ -4,6 +4,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -f "$HOME/.restic-env" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "$HOME/.restic-env"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "💾 Creating Restic backup..."
|
echo "💾 Creating Restic backup..."
|
||||||
|
|
||||||
if ! command -v restic >/dev/null 2>&1; then
|
if ! command -v restic >/dev/null 2>&1; then
|
||||||
|
|||||||
@@ -22,6 +22,12 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Optional: Restic-Umgebungsvariablen aus ~/.restic-env laden
|
||||||
|
if [ -f "$HOME/.restic-env" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. "$HOME/.restic-env"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "💾 Restoring from Restic backup..."
|
echo "💾 Restoring from Restic backup..."
|
||||||
|
|
||||||
if ! command -v restic >/dev/null 2>&1; then
|
if ! command -v restic >/dev/null 2>&1; then
|
||||||
|
|||||||
Reference in New Issue
Block a user