infrastructure/roles/backup/files/node002/immich.sh

6 lines
210 B
Bash
Raw Normal View History

2024-09-26 22:02:36 +00:00
backup_path="$BACKUP_LOCATION/immich"
mkdir -p "$backup_path"
cd /opt/services/immich || exit
docker compose exec database sh -c 'pg_dump -U "$DB_USERNAME" "$DB_DATABASE"' | gzip >"$backup_path/immich.sql.gz"