From 9bdf7b5a444aecc17c708073099d5b7db804308f Mon Sep 17 00:00:00 2001 From: arcbjorn Date: Mon, 24 Oct 2022 01:10:13 -0300 Subject: [PATCH] docs(readme): add DB backup & restore instructions --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b44f32c..1be42bf 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,22 @@ Infrastructure for base server -**Important note** - -For postgreSQL multiple databases scripts: +#### For postgreSQL multiple databases scripts: ```sh chmod +x scripts/create-multiple-postgres-databases.sh ``` + +#### Database backup & restore: + +Backup: + +```sh +docker exec -t pg_dumpall -c -U > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql +``` + +Restore: + +```sh +cat .sql | docker exec -i psql -U +```