--- /dev/null
+#!/bin/bash
+
+DB_NAME=test.db
+DIR_LOCAL="$(cd "$(dirname "$0")" && pwd)"
+ARCHIVE=$1
+
+# remove temp folder in case it exists
+rm -Rf temp
+
+# extract archive in folder ./temp
+mkdir temp
+echo -e "Extracting archive..."
+tar --transform='s,^,temp/,' -xzf "$ARCHIVE"
+echo -e "Archive extracted successfully."
+
+# remove database in case it exists
+rm -f $DIR_LOCAL/$DB_NAME
+
+# create database
+pushd $DIR_LOCAL/../../db/
+./db_init $DIR_LOCAL/$DB_NAME
+echo -e "Database created."
+
+# fill database with test data
+PYTHONPATH=$DIR/../../db/ python DatabaseAccess.py $DIR_LOCAL/$DB_NAME
+popd
+
+# fill logging information
+echo -e "Parsing log files"
+for folder in $(find $DIR_LOCAL/temp -type d -name 'libtorrent_logs*' | sort ); do
+ for log_file in $(find $folder -type f | sort); do
+ yes y | PYTHONPATH=$DIR_LOCAL/../../db/ python $DIR_LOCAL/LogParser.py -i 1 -f $log_file $DIR_LOCAL/$DB_NAME
+ done
+done
+echo -e "Log files parsed."
+
+# fill status information
+echo -e "Parsing status file."
+PYTHONPATH=$DIR_LOCAL/../../db/ python $DIR_LOCAL/StatusParser.py -i 1 -f $DIR_LOCAL/temp/status.log $DIR_LOCAL/$DB_NAME
+echo -e "Status file parsed."
+
+echo -e "DONE!"
+
+rm -Rf temp
+exit 0