diff --git a/makefile b/makefile index 6f12878..13a8a04 100644 --- a/makefile +++ b/makefile @@ -49,7 +49,9 @@ backup: @docker exec -t fortunebet-backend-postgres-1 pg_dumpall -c -U root > backup/dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql restore: @echo "Restoring latest backup..." - docker exec -i fortunebet-backend-postgres-1 psql -U root -d gh < $(file) + @latest_file=$$(ls -t backup/dump_*.sql | head -n 1); \ + echo "Restoring from $$latest_file"; \ + docker exec -i fortunebet-backend-postgres-1 psql -U root -d gh < $$latest_file postgres_log: docker logs fortunebet-backend-postgres-1 .PHONY: swagger