Knowledge Base Administration Guide

Database / Backup

DB Directory

The Simscope database is mapped to the --db=DBPATH CLI argument when Simscope is started.

Simscope will manage its entire database within the specified DBPATH directory.


Backup

Automatic backup

Simscope can automatically backup its database on a weekly basis, via the [backup] section in simscope.config. This will automatically run a backup every Sunday morning, and send the Simscope administrator a success/failure notification email.

# Automatic weekly Simscope database backup
[backup]
dir = "/PATH/TO/simscope-backup"

Custom backup

If you want to backup Simscope yourself, just rsync the entire Simscope DB directory tree to a backup directory.

For best results, it is recommended to pause data import while the backup runs, and then re-enable data import afterward.

Ideally you should stop the server first, but this can be hot-copied (albeit the backup data will not be consistent if jobs are still being imported into Simscope while the backup occurs).


Pruning old records from the database

Periodically, you may want to prune old records, to shrink the database size.

(FIX: instructions...)

Deleting the database

To delete the entire database in Simscope:

  1. Stop the server.
  2. Delete DBPATH directory (and all subdirectories).
  3. Start Simscope. This will populate a brand new (empty) database.
    • Note: this will generate a new admin account password, due to simscope-admin.auth file getting regenerated