fix: compression to the backup files

This commit is contained in:
Samuel Tariku 2025-07-06 00:29:09 +03:00
parent dd63874425
commit 75f2499bb1

View File

@ -46,10 +46,10 @@ postgres:
.PHONY: backup .PHONY: backup
backup: backup:
@mkdir -p 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: restore:
@echo "Restoring latest backup..." @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: postgres_log:
docker logs fortunebet-backend-postgres-1 docker logs fortunebet-backend-postgres-1
.PHONY: swagger .PHONY: swagger