diff --git a/migrations/README.md b/migrations/README.md new file mode 100644 index 0000000..b7a40eb --- /dev/null +++ b/migrations/README.md @@ -0,0 +1,11 @@ +# Migrations + +Dump postgresql database from docker container: +```sh +docker exec -t nourybot-postgres-1 pg_dumpall -c -U nourybot > dump_$(date +%Y-%m-%d_%H_%M_%S).sql +``` + +Restore postgres database to docker container: +```sh +cat dump_2024-07-17_22_23_32.sql | docker exec -i nourybot-postgres-1 psql -U nourybot +```