-
Notifications
You must be signed in to change notification settings - Fork 3
Database: Initialization and Loading in BibTeX files
A Lee edited this page Sep 5, 2017
·
3 revisions
- Place an SQL database dump in the root folder of the project and call it
catalog.sql(the name of the file is set in thetasks.pyrestore_from_dumpfunction). - Delete your old docker volumes and containers (
docker-compose down -v) and bring all the containers up again (docker-compose up -d). - Run
inv rfdin the django container, e.g.,docker-compose exec django inv rfd. The data should now be loaded into the database.
To load in a BibTeX file run the load_bibtex management command. For example, to load a file named abm_publications_2016.bib into the database as user foo you would run
./manage.py load_bibtex -f abm_publications_2016.bib -u foo
% docker-compose exec django bash
% pg_dump -h db -U catalog comses_catalog > catalog.sql
% mv catalog.sql /path/to/docker/volume # e.g., /catalog/logs