From 109a510e9433b306d9731f9494008d08abd4f0f2 Mon Sep 17 00:00:00 2001 From: Mikucat Date: Fri, 5 Apr 2024 15:05:13 +0800 Subject: [PATCH] fix: add -T flag in docker compose exec --- en/guide/judge_language_customization.md | 2 +- en/management/backup_and_restore.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/en/guide/judge_language_customization.md b/en/guide/judge_language_customization.md index f98f2dc..718a084 100644 --- a/en/guide/judge_language_customization.md +++ b/en/guide/judge_language_customization.md @@ -34,7 +34,7 @@ 5. Overwrite judge language config in database from mounted languages.py ```bash - docker compose exec oj-backend python manage.py shell < "db-$(date -Iseconds).sql" + docker compose exec -T oj-postgres pg_dumpall -c -U onlinejudge > "db-$(date -Iseconds).sql" # zstd - docker compose exec postgres pg_dumpall -c -U onlinejudge | zstd -o "db-$(date -Iseconds).sql.zst" + docker compose exec -T oj-postgres pg_dumpall -c -U onlinejudge | zstd -o "db-$(date -Iseconds).sql.zst" ``` - restore ```bash - docker compose exec postgres psql < "" + docker compose exec -T oj-postgres psql < "" # zstd zstd -d "" | docker compose exec postgres psql