English
Data Governance
Rust-Srec is a recording tool, not a source of rights to record or process a broadcast. The operator is responsible for platform terms, copyright, privacy, employment, and retention obligations in every applicable jurisdiction.
Data Inventory
| Data | Typical location | Risk |
|---|---|---|
| Video, audio, and chat/danmaku | OUTPUT_DIR and pipeline destinations | Copyrighted content, personal data, usernames, messages |
| Streamer and session metadata | SQLite in DATA_DIR | Identifiers, URLs, titles, session history, per-check history. Every session also stores the streamer name it was recorded under, and that copy is kept after the streamer itself is deleted; per-check history is not. |
| Platform credentials and cookies | Database (account profiles) and exports | Account takeover and access to restricted content |
| User accounts and password hashes | SQLite and configuration exports | Authentication data |
| Notification and upload secrets | SQLite and configuration exports | Third-party account or endpoint access |
| Logs and notification events | LOG_DIR, container logs, database | Paths, platform metadata, operational history |
Required Decisions Before Use
- Document the lawful basis and permission for each channel, including private, subscriber-only, or password-protected content.
- Define retention separately for media, chat, session history, job history, notifications, and logs.
- Identify every external destination used by webhooks, email, Telegram, Gotify, Discord, rclone, Baidu Netdisk (BaiduPCS-Go), or custom pipeline commands.
- Limit access to people with a defined operational or editorial need.
- Define how deletion, legal hold, subject requests, and incident response apply to source files, derived files, backups, and remote copies; see Deletion Semantics for what in-app deletions cover.
Application history-retention settings do not constitute a complete deletion policy and do not remove every media copy. Sessions, pipeline jobs, notification events, and logs are operational tools rather than compliance evidence; add external audit, legal-hold, or subject-request controls where required (see Scope and Limits). Verify deletion end to end.
Deletion Semantics
Deleting a streamer removes that streamer and its configuration. It deliberately keeps the recording history: the streamer's sessions survive, as do the media-output rows, session segments, danmaku statistics, and session events attached to them. A surviving session is marked ended and carries the streamer name it was recorded under, so the history stays readable without the streamer. That name is written when the session starts and is never updated afterwards, so a session that began before a rename keeps the older name — and a session whose streamer was already missing carries no name at all.
Deletion takes effect immediately but is not always instantaneous. The streamer disappears from the interface and the API at once, and nothing starts new work for it; if it was recording, that recording is closed out first, and if post-processing is still running the streamer's own row is removed once that finishes — including across a restart. Until then the streamer's URL is still taken, so re-adding the same address, importing a configuration that still contains it, or deleting a template it uses is refused with "still being removed; try again shortly". Scripts that delete a streamer and then re-create it at the same URL should retry.
Two kinds of record do not come through intact:
- Per-check history — the outcome, selected stream, title, and viewer count recorded for each status check — is deleted with the streamer.
- Notification events survive, but their reference to the streamer is cleared and no name is stored alongside it, so those rows lose their attribution. Take this into account when setting notification retention.
For a retention or erasure policy this means removing a streamer is not the erasure step, and the retained name outlives its subject. Three further operations are needed, and the first two have to run in this order:
- Delete the media files first, while the records naming them still exist. Deleting a media output takes an option to remove the file from disk as well as its record; without it, only the record goes.
- Delete the sessions themselves, individually or as a batch. A session delete also removes the media-output rows, segments, danmaku statistics, and session events under it. It does not touch files on disk, and it destroys the rows holding their paths, so running it first leaves the files with nothing left to locate them by. Pipeline jobs, DAG executions, and upload records reference a session by identifier without a foreign key, so they survive it.
- Account separately for copies a pipeline uploaded elsewhere. No deletion operation in the application reaches a remote destination — the pipeline's
deletestep and the media-output delete option both act on a local path — so remote copies have to be removed wherever they were sent. Upload records carry the remote path of each completed upload and are the closest thing to an inventory of them.
A pipeline can still change remote data, just not as part of a deletion the application offers: an rclone step set to sync removes files at the destination that are absent from the source, args passes arbitrary flags through to rclone, and an execute step runs whatever command it is given. Treat those steps as having the full reach of the credentials they run with.
Three cases delete a file without a per-file request: a recorded segment below min_segment_size_bytes is removed from disk with its sibling chat file while the session is still running, unless it ended because the stream's resolution or codec changed; a failed pipeline job's partial outputs are cleaned up; and output retention, when enabled with Delete records and files, removes the tracked files of expired outputs. Output retention covers registered media outputs only, not every derivative or remote copy, so none of these substitutes for a complete retention policy.
Database changes roll back together if a media-record deletion fails. Optional filesystem deletion is not transactional.
Decommissioning
Disable streamers, revoke platform and notification credentials, revoke user sessions, stop the service, inventory remote outputs, then erase or archive data according to policy (following the media-file → session → remote-copy order in Deletion Semantics). Include configuration exports and backups; deleting the live database alone is insufficient.
This section is now in Persistence contracts.