Skip to content

Data retention ​

Most of PBXsight's database is per-second data: one sample per second of every run, plus the run's log files. To keep the database from growing without end, a finished run's per-second data and logs are removed 14 days after it ended. The run itself stays.

First step: nothing — the default of 14 days applies on its own. To change it, open Settings → Data retention (Set the period); to protect one run, press Keep at the top of its run page.

What is kept and what is removed ​

Kept foreverRemoved after the retention period
the run: type, profile, parameters, label, who started it, schedulethe per-second samples behind the charts
verdict and every check, summary cardsthe per-second CSV export
trend windows (busy hour, watch) and limit stepsthe run's log files in tester.work_dir/<id>/ (caller, phones, media, watch logs)
"What to look at" hints, setup breakdown with the slowest calls
SIP response and hangup cause counters
Kamailio, rtpengine and stuck-call summaries

So Results, the Compare tables, schedule history and the HTML report keep working. A cleaned-up run's page, Compare and the report show Per-second data and logs removed on DATE (data retention: N days) where the charts and logs were. Results marks such runs with data removed.

Set the period ​

  • Default: 14 days. 0 = keep forever.
  • In config.yaml: storage.retention_days (or PBXSIGHT_STORAGE_RETENTION_DAYS).
  • In the app: an admin opens Settings (gear icon in the top bar) → Data retention, enters the days (0 to 3650) and saves. Once saved there, that value wins over config.yaml, also after restarts. The card shows where the value comes from, the database and run-file sizes, the last cleanup and the last one that removed something.

The run's age counts from when it ended. Runs still going are never touched.

Keep a run: pin it ​

Operators and admins pin a run on its page with Keep (next to the label). A kept run's per-second data and logs are never removed. Results shows a pin next to kept runs; viewers see the pin but can't change it. Pinning a run that was already cleaned up doesn't bring its data back. Each pin and unpin is in the activity log (test.keep / test.unkeep).

Baselines are never cleaned up ​

A run marked as the baseline of its test keeps its per-second data and logs, like a kept run. Removing the mark makes it eligible again at the next cleanup (unless it is also kept). A run that was already cleaned up can still be marked as the baseline: the comparison uses its summary.

Know when the cleanup runs ​

  • Runs about a minute after the app starts, then once a day while it runs. An admin can also click Clean up now on the Settings page.
  • When it removed something, it compacts the database file (SQLite VACUUM) so the disk space comes back. While a test runs the compaction waits until the test ends; the deletes happen right away and never disturb a running test.
  • One activity-log entry per cleanup that removed something, by (retention) (or the admin who clicked Clean up now), e.g. 3 runs: per-second data removed (older than 14 days), DB 37.0 → 9.1 MB. Nothing removed: no entry. When the compaction had to wait for a running test, a second entry data.vacuum (by (retention)) records the final size once it ran (DB 37.0 → 9.1 MB).
  • Changing the period is logged as settings.retention (14 → 30 days).

Not touched by the cleanup: the activity log, schedule history, sessions, and directories in runs/ that belong to no run.

Back up the database ​

See Secrets at rest and backups: pbxsight backup FILE.zip copies the database with its key while the app runs, pbxsight restore FILE.zip -force puts it back.

PBXsight — load testing and monitoring for FreeSWITCH PBXes. Only test systems you own or may test.