11 lines
236 B
Bash
Executable file
11 lines
236 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" -Fc -C -Zzstd:5 "$DB_DATABASE"' >"$backup_path/immich.dump"
|