fix: compression to the backup files
This commit is contained in:
parent
dd63874425
commit
75f2499bb1
4
makefile
4
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user