V6.1 continue beating on the backup
Quality Gate / gate (push) Failing after 2m34s

This commit is contained in:
Jim Lancaster
2026-09-02 10:04:38 -05:00
parent 75dc946123
commit 494f378e48
6 changed files with 124 additions and 29 deletions
+12 -3
View File
@@ -16,6 +16,8 @@ logs_file="logs-${timestamp}.tar.gz"
manifest_file="backup-${timestamp}.manifest"
mkdir -p "${BACKUP_DIR}"
mkdir -p "${APP_DATA_BACKUP_DIR}"
app_data_backup_abs="$(cd "${APP_DATA_BACKUP_DIR}" && pwd -P)"
# If SYNOLOGY_BACKUP_DIR wasn't exported in the shell, read it from ENV_FILE.
if [ -z "${SYNOLOGY_BACKUP_DIR}" ] && [ -f "${ENV_FILE}" ]; then
@@ -68,10 +70,17 @@ find "${BACKUP_DIR}" -type f \( \
-name 'backup-*.manifest' \
\) -mtime +"${RETENTION_DAYS}" -delete
# Always keep a rolling incremental mirror of uploaded files in BACKUP_DIR.
mkdir -p "${APP_DATA_BACKUP_DIR}"
# Always keep a rolling mirror of app data in BACKUP_DIR, unless that target
# is nested under /app/data (which would recursively copy into itself).
if [ -d /app/data ]; then
cp -a /app/data/. "${APP_DATA_BACKUP_DIR}/"
case "${app_data_backup_abs}" in
/app/data|/app/data/*)
echo "Skipping app data mirror because APP_DATA_BACKUP_DIR is nested under /app/data: ${APP_DATA_BACKUP_DIR}"
;;
*)
cp -a /app/data/. "${APP_DATA_BACKUP_DIR}/"
;;
esac
fi
mkdir -p "${UPLOADS_BACKUP_DIR}/documents" "${UPLOADS_BACKUP_DIR}/photos"