infra/dev: env_value defaults match compose, die helper, shared Gradle lock check; drop unused RCLONE_REMOTE and M2a leftovers; fix stale Pi compose path
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B
This commit is contained in:
+2
-2
@@ -6,13 +6,13 @@ set -euo pipefail
|
||||
# shellcheck source=lib.sh
|
||||
. "$(dirname "$0")/lib.sh"
|
||||
|
||||
backup_dir="$(dev_path "$(env_value KVITT_DEV_BACKUP_DIR)")"
|
||||
backup_dir="$(dev_path "$(env_value KVITT_DEV_BACKUP_DIR ./backups)")"
|
||||
mkdir -p "$backup_dir"
|
||||
|
||||
compose --profile backup run --rm -T backup /backup.sh
|
||||
|
||||
latest="$(find "$backup_dir" -maxdepth 1 -name 'kvitt-*.sqlite.gz' | sort | tail -n 1)"
|
||||
[[ -n "$latest" ]] || { echo "backup.sh: no snapshot found in $backup_dir" >&2; exit 1; }
|
||||
[[ -n "$latest" ]] || die "no snapshot found in $backup_dir"
|
||||
name="$(basename "$latest")"
|
||||
result="$(compose --profile backup run --rm -T --entrypoint sh backup -c \
|
||||
"gunzip -c '/backups/$name' > /tmp/check.sqlite && sqlite3 -batch -noheader -list /tmp/check.sqlite 'PRAGMA integrity_check'")"
|
||||
|
||||
Reference in New Issue
Block a user