M27: make backup checksums portable
This commit is contained in:
@@ -22,7 +22,8 @@ docker compose -p "$project" $compose_files exec -T db sh -eu -c \
|
||||
docker compose -p "$project" $compose_files exec -T db pg_restore --list \
|
||||
< "$temporary_file" > /dev/null
|
||||
mv "$temporary_file" "$backup_file"
|
||||
sha256sum "$backup_file" > "${backup_file}.sha256"
|
||||
(cd "$destination" && \
|
||||
sha256sum "$(basename "$backup_file")" > "$(basename "$backup_file").sha256")
|
||||
BACKUP_RETENTION_DAYS="$retention_days" BACKUP_MINIMUM_COPIES="$minimum_copies" \
|
||||
./deploy/unraid/prune-postgres-backups.sh "$destination"
|
||||
trap - EXIT INT TERM
|
||||
|
||||
@@ -21,7 +21,7 @@ while true; do
|
||||
--host=db --username="$POSTGRES_USER" "$POSTGRES_DB" > "$temporary" \
|
||||
&& pg_restore --list "$temporary" > /dev/null; then
|
||||
mv "$temporary" "$target"
|
||||
sha256sum "$target" > "$target.sha256"
|
||||
(cd "$destination" && sha256sum "$(basename "$target")" > "$(basename "$target").sha256")
|
||||
if [ -n "$secondary" ]; then
|
||||
cp "$target" "$target.sha256" "$secondary/"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user