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' ```