10 lines
228 B
Bash
Executable file
10 lines
228 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
backup_path="$1"
|
|
|
|
if [ "$2" != "before" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
cd /opt/services/immich || exit
|
|
docker compose exec database sh -c 'pg_dump -U "$DB_USERNAME" "$DB_DATABASE"' | gzip >"$backup_path/immich.sql.gz"
|