File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ A typical docker-compose.yml looks like this:
2323
2424 services:
2525 db:
26- image: postgres:11
26+ image: postgres
2727 volumes:
2828 - pgdata:/var/lib/postgresql/data
2929 restart: always
@@ -36,7 +36,7 @@ A typical docker-compose.yml looks like this:
3636 depends_on:
3737 - db
3838 restart: always
39- command: bash -c "python manage.py collectstatic --no-input && python manage.py makemigrations && python manage.py migrate && gunicorn --workers=3 pyobs_weather.wsgi -b 0.0.0.0:8000"
39+ command: bash -c "python manage.py collectstatic --no-input && python manage.py migrate && gunicorn --workers=3 pyobs_weather.wsgi -b 0.0.0.0:8000"
4040
4141 redis:
4242 image: redis
@@ -115,4 +115,19 @@ With all three files in one directory, you can easily do
115115 ./manage.py createsuperuser
116116
117117 The web frontend should now be accessible via web browser at http://localhost:8002/ and the admin panel
118- at http://localhost:8002/admin.
118+ at http://localhost:8002/admin .
119+
120+
121+ ## Backup and restore config
122+
123+ Easiest way to backup the whole weather database is using the ` dumpdata ` command:
124+
125+ ./manage.py dumpdata --indent 2 weather > weather.json
126+
127+ Probably you want to exclude the actual sensor readings and only backup the configuration:
128+
129+ ./manage.py dumpdata --indent 2 weather --exclude weather.value > weather.json
130+
131+ In a fresh setup, you can restore the data via the 'loaddata' command:
132+
133+ ./manage.py loaddata weather.json
You can’t perform that action at this time.
0 commit comments