2024-12-28 18:47:30 +01:00
|
|
|
#!/bin/bash
|
|
|
|
SCRIPT_ABS_LOCATION=$(realpath "$(dirname "${0}")")
|
|
|
|
|
2024-12-29 15:08:09 +01:00
|
|
|
# shellcheck disable=SC1090
|
2024-12-30 01:49:10 +01:00
|
|
|
source "$SCRIPT_ABS_LOCATION/../common-backup.sh"
|
2024-12-29 15:08:09 +01:00
|
|
|
# shellcheck disable=SC1090
|
2024-12-30 01:49:10 +01:00
|
|
|
source "$SCRIPT_ABS_LOCATION/portainer-backup.env"
|
2024-12-28 18:47:30 +01:00
|
|
|
|
2024-12-29 15:08:09 +01:00
|
|
|
# shellcheck disable=SC2034
|
2024-12-28 18:47:30 +01:00
|
|
|
LOG_FILE="$SCRIPT_ABS_LOCATION/portainer-backup.log"
|
|
|
|
|
2024-12-30 01:49:10 +01:00
|
|
|
stop_container "$APP_CONTAINER"
|
2024-12-28 18:47:30 +01:00
|
|
|
|
2024-12-30 01:49:10 +01:00
|
|
|
run_duplicati_backup \
|
|
|
|
"$BACKUP_DESTINATION" \
|
|
|
|
"$APP_CONTAINER" \
|
|
|
|
7 \
|
|
|
|
"$SFTP_USERNAME" \
|
|
|
|
"$SFTP_PASSWORD" \
|
|
|
|
"$SFTP_FINGERPRINT" \
|
|
|
|
"$BACKUP_ENCR_PASSPHRASE" \
|
|
|
|
"$SOURCE_DIR"
|
2024-12-28 18:47:30 +01:00
|
|
|
|
2024-12-30 01:49:10 +01:00
|
|
|
start_container "$APP_CONTAINER"
|
2024-12-28 18:47:30 +01:00
|
|
|
|