From 75f2499bb14286129ffd3f8394f8dceb28d9e8f0 Mon Sep 17 00:00:00 2001 From: Samuel Tariku Date: Sun, 6 Jul 2025 00:29:09 +0300 Subject: [PATCH] fix: compression to the backup files --- makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 6f12878..b46d3cd 100644 --- a/makefile +++ b/makefile @@ -46,10 +46,10 @@ postgres: .PHONY: backup backup: @mkdir -p backup - @docker exec -t fortunebet-backend-postgres-1 pg_dumpall -c -U root > backup/dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql + @docker exec -t fortunebet-backend-postgres-1 pg_dumpall -c -U root | gzip > backup/dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql.gz restore: @echo "Restoring latest backup..." - docker exec -i fortunebet-backend-postgres-1 psql -U root -d gh < $(file) + gunzip -c $(file) | docker exec -i fortunebet-backend-postgres-1 psql -U root -d gh postgres_log: docker logs fortunebet-backend-postgres-1 .PHONY: swagger