From 9d381864041021d90e8ff0647a3d8bf78131f810 Mon Sep 17 00:00:00 2001 From: nough Date: Thu, 7 Jul 2022 10:16:52 +0100 Subject: [PATCH] Update backup.md updated with functional code --- docs/system/backup.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/system/backup.md b/docs/system/backup.md index d9bd53ab4..33a2ef576 100644 --- a/docs/system/backup.md +++ b/docs/system/backup.md @@ -35,12 +35,13 @@ You can back up from docker even when the tandoor container is failing, so long To back up: ``` -Sudo docker exec -t db_recipes -c -U djangouser +sudo docker exec -t docer_db_recipes_1 pg_dumpall -U djangouser > pgdump.sql + ``` To restore: ``` -Cat dump.sql | docker exec -i psql postgres -U djangouser +cat pgdump.sql | docker exec -i psql postgres -U djangouser ``` This connects to the postgres table instead of the actual dgangodb table, as the import function needs to delete the table, which can't be dropped off you're connected to it.