Maintenance
This page lists task that you may want to perform for regular server maintenance.
Password reset
The only user currently supported by THREATGET is "admin". If you forgot the admin password it can be reset only from the commandline on the server where THREATGET is running.
To do that navigate to the folder where the docker-compose.yml
file is located and run the following commands:
cd ~/threatget
sudo docker-compose down
sudo docker-compose run threatget reset-pw.sh
sudo docker-compose up -d
Backups
It is best practice to make a backup of the database as often as possible, at least daily.
The database backup can be initiated as root using cd /home/username/docker; docker-compose start backup
. Subsequently the backup is stored in /var/backups/postgres
. From there it should be copied off the machine to a secure backup location.
Restore
This operation will erase all content of the database. Please create a backup before initiating a restore.
Make sure that the db container is up and running, but the THREATGET container is stopped.
cd ~/threatget
sudo docker-compose start db
sudo docker-compose stop threatget
Then we are ready to restore the database. The file with the backup on the host machine in this example is /var/backups/postgres/threatget.mycompany.com-2020-01-31_05-00-02.dump
.
sudo docker-compose exec -T db pg_restore -C -c -F c -d postgres -U threatget < /var/backups/postgres/threatget.mycompany.com-2020-01-31_05-00-02.dump
Then we can start the THREATGET container again.
sudo docker-compose start threatget