Backups¶
What holds the state of a manager¶
| What | Where | Why it matters |
|---|---|---|
| Configuration, persona, admin token, bait seed | /opt/redpot/manager/rpot.json |
without it, planted baits can no longer be recognised and remote sensors cannot be served |
| Installer state | /opt/redpot/manager/installer.json |
allow-lists, ports, SSH and firewall decisions used by add-decoy, set-access, update and uninstall |
| Manager certificate and key | /opt/redpot/manager/tls/ |
remote sensors pin its fingerprint |
| Bait files | /opt/redpot/manager/baits/ |
the files served by the local decoys |
| Database (events, incidents, alert records, sensors) | Docker volume redpot_console-data (/var/lib/rpot/rpot.db in the console) |
history and enrolled sensors |
| Alert and event logs | /opt/redpot/manager/logs/ |
your SIEM feed and its archives |
All of it is secret: it contains the admin token and the plaintext baits. Store backups encrypted and root-only.
Automatic backups on update¶
sudo ./install.sh update makes a backup before it changes anything, in
/var/backups/redpot/<time>-<manager|sensor>-<version>/ (root only, outside the install directory). It holds the
database (copied with the SQLite backup API while the console runs, then checked), rpot.json (or the sensor's
conf/sensor.json), installer.json, docker-compose.yml, firewall.sh and the systemd unit, with owners and modes.
A failed update restores from it automatically. See Update.
uninstall removes these backups unless you pass --keep-data.
Your own backups¶
Community Edition has no separate backup or restore command. To take a copy of a manager yourself, stop the service so the database is consistent, copy the install directory and the database volume, and start it again:
sudo systemctl stop redpot
VOL=$(sudo docker volume inspect -f '{{.Mountpoint}}' redpot_console-data)
sudo tar -czpf /root/redpot-backup-$(date +%F).tar.gz /opt/redpot/manager "$VOL"
sudo systemctl start redpot
Note
A restore procedure is not provided by the Community Edition tools. Restoring files by hand onto the same host, with the same owners and modes, is possible; a restore onto a different host changes interface names and addresses that the installer state and firewall depend on, and has not been documented.
For a remote sensor, the state is in /opt/redpot/sensor/. A lost sensor is simpler to revoke and enroll again with a
new join string.