Improve usage of pg_dump in backup
This commit is contained in:
parent
731647be9d
commit
f7936633e5
3 changed files with 13 additions and 14 deletions
|
|
@ -7,4 +7,5 @@ if [ "$2" != "before" ]; then
|
|||
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"
|
||||
|
||||
docker compose exec database sh -c 'pg_dump -U "$DB_USERNAME" -Fc -C -Zzstd:5 "$DB_DATABASE"' >"$backup_path/immich.dump"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue