Skip to content

Example data

Mathias Stuhlmacher edited this page Apr 10, 2021 · 17 revisions

Playing around with example data

Clear database

To reuse an instance of DFIRTrack after testing you don't have to reinstall everything (in case you do not use Docker). The only dump of data (excepting meta data like log files) is the PostgreSQL database. So after deleting the old and creating a new database you should be fine.

  • login to database management system using psql: $ sudo -u postgres psql
  • delete already existing database: psql> # DROP DATABASE dfirtrack;
    • note that no programs (e. g. service, development server) are allowed to touch the database at that time
  • create a fresh database: psql> # CREATE DATABASE dfirtrack;
  • leave database management: psql> # \q
  • activate virtual environment (if not done yet): $ source ~/dfirtrack/venv/bin/activate
  • switch to directory: (venv) $ cd ~/dfirtrack
  • migrate database content: (venv) $ python3 manage.py migrate
  • create cache table: (venv) $ python3 manage.py createcachetable
  • create admin user and follow the provided instructions: (venv) $ python3 manage.py createsuperuser
  • start development server or service