Backup for Manual installation on Linux
Configuration file, embedded SQLite database, log files are all saved into CTFreak config folder $HOME/.config/ctfreak
.
CTFreak offers 2 methods for backing up/restoring his data.
Cold backup
The cold backup allows you, with a momentary service shutdown, to perform a complete backup of CTFreak.
Backup
Shut down the CTFreak service.
sudo systemctl stop ctfreak
Make a backup of the CTFreak config folder.
Make a backup of the PostgreSQL backend database (only if you have chosen this type of backend rather than the default embedded SQLite database).
Start the service.
sudo systemctl start ctfreak
Restoration
Stop CTFreak service.
Replace the CTFreak config folder with the backed up one.
Restore the backup of the PostgreSQL backend database (only if you have chosen this type of backend rather than the default embedded SQLite database).
Start CTFreak service.
Hot backup
Hot backup is a partial backup, which means that the log and data files of your executions and the configuration file are not taken into account (in fact, only the backend database is backed up).
However, it has the advantage of not requiring a service shutdown.
If you cannot find a time window where no task is being executed in CTFreak, then a hot backup can be a good compromise.
For embedded SQLite backend database
Backup
To enable hot backup, log in to the UI as an administrator, go to Settings → Backup → Edit and complete the form.
Just like with tasks, hot backup can be scheduled using a cron expression.
Restoration
From a fresh installation of CTFreak:
Stop CTFreak service.
In the CTFreak config folder:
- Delete
db.sqlite-shm
anddb.sqlite-wal
files. - Replace
db.sqlite
file with the backed up one.
Start CTFreak service.
For PostgreSQL backend database
…