infrastructure/roles/backup/files/hooks/immich_database

7 lines
186 B
Text
Raw Normal View History

2024-10-05 23:59:46 +00:00
#!/usr/bin/env bash
backup_path="$1"
2024-09-26 22:02:36 +00:00
cd /opt/services/immich || exit
docker compose exec database sh -c 'pg_dump -U "$DB_USERNAME" "$DB_DATABASE"' | gzip >"$backup_path/immich.sql.gz"