From dc2ea1265f901ab2fa71e098fd8faa5e5cd2124a Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 16 Jan 2021 17:48:00 +1100 Subject: [PATCH] instructions on how to fully reset the DB in docker from tables.sql --- README | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README b/README index bb86d9b..1658a76 100644 --- a/README +++ b/README @@ -11,3 +11,12 @@ pip packages: * opencv-python * datetime * pytz + + +To rebuild DB: + + ###BE CAREFUL this completely destroys the database contents and starts from + #scratch, when we get real data, we will instead cp a backup file not the + #tables.sql + + ( cd /srv/docker/config/ ; sudo docker-compose stop padb ; yes | sudo docker-compose rm padb ; sudo rm -rf /srv/docker/container/padb/data/ ; sudo cp /home/ddp/src/photoassistant/tables.sql /srv/docker/container/padb/docker-entrypoint-initdb.d/tables.sql ; sudo docker-compose up padb )