mirror of
https://github.com/QingdaoU/oj-docs.git
synced 2024-12-28 07:21:43 +00:00
fix: add -T flag in docker compose exec
This commit is contained in:
parent
d53df46251
commit
109a510e94
@ -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 <<EOF
|
||||
docker compose exec -T oj-backend python manage.py shell <<EOF
|
||||
from options.options import SysOptions
|
||||
SysOptions.reset_languages()
|
||||
EOF
|
||||
|
@ -5,16 +5,16 @@
|
||||
- backup
|
||||
|
||||
```bash
|
||||
docker compose exec postgres pg_dumpall -c -U onlinejudge > "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 < "<backup file>"
|
||||
docker compose exec -T oj-postgres psql < "<backup file>"
|
||||
|
||||
# zstd
|
||||
zstd -d "<backup file>" | docker compose exec postgres psql
|
||||
|
Loading…
Reference in New Issue
Block a user