infrastructure/roles/backup/files/hooks/immich_database

6 lines
186 B
Bash
Executable file

#!/usr/bin/env bash
backup_path="$1"
cd /opt/services/immich || exit
docker compose exec database sh -c 'pg_dump -U "$DB_USERNAME" "$DB_DATABASE"' | gzip >"$backup_path/immich.sql.gz"