Skip to content

EN Storage

Guiyomee edited this page Nov 27, 2026 · 4 revisions

Recording and storage

Français

How RustNVR records

  • The camera's stream is written as it is into fragmented MP4, without decoding nor re-encoding, in segments of a chosen length, cut on a key frame.
  • Each segment is first written as .mp4.part, flushed to disk, then renamed: a power cut leaves at worst one partial segment, repaired automatically at the next start.
  • The files are the reference: <folder>/<camera>/<YYYY-MM-DD>/<YYYYMMDDTHHMMSS.mmmZ>.mp4 (UTC time). They are ordinary MP4 files, readable without RustNVR (VLC, FFmpeg).

Per camera, When to record:

  • Continuously: all the time;
  • Only on motion: each event, with the seconds before (5 s by default, kept in memory) and after. Motion detection must be on for the camera (see Detection and AI).

Recording never depends on detection or AI: if they fail, videos go on.

Storage destinations

Settings → Storage lists the storage destinations. Each camera records to one or more of them (in its form); the « default » one is used for new cameras.

Kind How
Local disk the recordings folder
Mounted folder / NAS share an SMB or NFS share mounted in the system (fstab), written directly
S3 (Amazon, MinIO, Backblaze, Wasabi…) finished segments uploaded one by one from a local waiting folder
SFTP the same, to an SSH server; the server key is checked

NAS: tick « Network share must be mounted ». RustNVR then checks that the share is really mounted before writing: otherwise a missing NAS would let RustNVR fill the empty folder on the system disk. While the NAS is down, recording falls back to the local disk, then goes back to the NAS when it returns. (Since 2026.11.08) The segment being written when the NAS fails is not lost: its end goes on on the local disk, and its start, already on the NAS, is recovered a few minutes after the NAS returns. The interface (bell), MQTT and the notifications report a degraded storage.

With Docker, mount the share on the host, add it to volumes (for example /mnt/nas/rustnvr:/nas), give the folder to account 1000 (sudo chown -R 1000:1000 /mnt/nas/rustnvr), then declare /nas. With Proxmox, the --smb option of the install script does all that.

Retention

Per storage destination and, if needed, per camera:

  • Keep (days): older videos are deleted;
  • Max size (GB): the oldest go beyond it;
  • Min free space (GB): room kept free on the disk.

Applied every 10 minutes. S3 and SFTP have no retention on the remote side: use the bucket's lifecycle rules, or a clean-up on the server.

Play back, export, protect, delete

  • Playback: a timeline per day, several cameras in sync, speeds ×1 to ×8, segments played one after the other without a pause. (since 2026.11.11) Next to the videos, « Dans cette période » lists the events of the part of the timeline shown: a click makes every camera jump to that moment, 5 s before; « Événement suivant » and ‹ go from one event to the next. Timeline zoom: 24 h, 6 h, 1 h or 10 min. On a phone, the videos are in two columns and the list goes under them.
  • Export: one MP4 of the chosen period, copied as is or converted to H.264 for a player without H.265 (needs FFmpeg).
  • Protect: the chosen period escapes the retention and the free-space reserve (31 days at most per protection), for example to keep the proof of an incident.
  • Bookmark (since 2026.11.08): a note on the moment being played (« parcel delivery »). It shows on the timeline and in the « Signets du jour » list (« Lire » button), on every device. It does not protect the video: combine it with « Protect » to keep it.
  • Videos (since 2026.11.11): the recordings of a camera, day by day, as pictures (length, size, number of events, a lock when the period is protected). Click to watch the video large (← → to go to the others) or open it in Playback.
  • Delete (since 2026.11.11, administrators): the trash of a picture, on hover, in Videos (a recording), Events (the event and its picture, the video stays) and Pictures, or « Delete » (Delete key) in the opened video or picture. A confirmation is asked; a protected period cannot be deleted (remove its protection first), nor an ongoing event.
  • Daily time-lapse (since 2026.11.10): tick « Daily time-lapse » in the camera's Detection tab. Every night, RustNVR makes a video of about 48 s of the day before (one picture per minute of recording, privacy masks applied, 720p), at low priority and one camera at a time. It is watched and downloaded in the camera's Recordings tab, where « Make » makes one for another day. Stored in .timelapse/ of the storage destination, removed after 30 days. Needs FFmpeg. The list shows how far it is (« Waiting », « Being made… 42 % »), then the play and download buttons; a failure says why, with « Try again ». The ■ button stops a time-lapse being made, the 🗑 button deletes a video already made.

Backing up the configuration

Settings → Backup → Create a backup: a .rnvrbak file encrypted with a passphrase, with the cameras and their passwords, the storage, MQTT, AI, webhooks, zones and lines (and, since 2026.11.10, the wall and the journey arrows). To restore (same page), RustNVR first shows a preview, file by file; the restore takes effect at the next restart. Handy before reinstalling or moving to another machine (Docker → LXC for instance).

Automatic backup (since 2026.11.10), same page: RustNVR makes this backup by itself every day, every 3 days, every week (advised)… in the .rustnvr-backups folder of the chosen storage, and keeps only the last ones (4 by default). Choose the NAS, preferably: the backup then survives the loss of the server's disk. A NAS that is not mounted is never replaced by the local disk: the backup waits and the page says why. The passphrase is stored on the server (backup.ui.toml, next to config.toml); write it down elsewhere too, because without it the files cannot be read. To restore, take one of these files from the NAS and use « Restore a backup ».

The videos are not in this backup: they are ordinary MP4 files, to copy as such.

Clone this wiki locally