From d507c9fc046c1404eaef2c828dfdc92e7b4d4892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Tue, 2 Mar 2021 10:26:44 +0100 Subject: [PATCH] Updated Troubleshooting (markdown) --- Troubleshooting.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Troubleshooting.md b/Troubleshooting.md index 75620cf..e8f77ea 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -38,7 +38,9 @@ docker-compose down -v --remove-orphans git reset --hard origin/release ```` -Enter the Netbox shell, e.g. to get access to `./manage.py`: +### Bash + +Start the Netbox Container shell, e.g. to get access to `./manage.py` or look for files: ``` docker-compose exec netbox /bin/bash @@ -61,6 +63,10 @@ docker-compose exec -T postgres sh -c 'pg_dump -cU $POSTGRES_USER $POSTGRES_DB' Restore that database: ```bash +# Stop all NetBox instances that access the db +docker-compose stop netbox netbox-worker + +# Restore the DB dump gunzip -c db_dump.sql.gz | docker-compose exec -T postgres sh -c 'psql -U $POSTGRES_USER $POSTGRES_DB' ```