-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Joe Wandy edited this page Oct 15, 2018
·
4 revisions
A collection of useful tips for ms2lda.
The following are the steps to manually backup and restore the Ms2ldavis database on DigitalOcean. We can do this is on top of the regular automatic backup from DO, e.g. when we want to import data locally.
To dump:
$ sudo -u postgres -i
$ pg_dump -U django -h localhost -Fc --no-owner --no-acl --clean > ms2ldaviz_db.dump
To restore:
$ sudo -u postgres -i
$ dropdb postgres
$ createdb postgres
$ pg_restore -Fc ms2ldaviz_db.dump -d postgres --clean --no-acl --no-owner
Django extensions is included in the project, so you can run Jupyter notebook and access django objects from it. This is very useful for debugging. From the virtual environment:
$ python manage.py shell_plus --notebook --settings=ms2ldaviz.settings_joe