Configuration: Storage Management

About

Agent DVR combines Media directories and individual device folders to manage your storage space efficiently. Set size and age limits so old recordings are cleared automatically and your drives never fill up, or use archive options and file locking to copy old content to cold storage and keep important content in the database.

The two levels of storage management

Storage management can be enabled at two independent levels. Both run every time the storage check happens (see Storage Interval in Server Settings), and each one only deletes the oldest files first until its own limits are met.

  • Storage Location (server level): Set in Server Settings - Storage. The Max Size and Max Age here apply to the combined total of every device that records into that location. If three cameras share a location with a 4096 MB limit, they share 4 GB between them - not 4 GB each. Files from the oldest device are removed first, whichever camera they belong to.
  • Device (camera or microphone level): Set on the Storage tab when editing a device. The Max Size and Max Age here apply only to that device's own folder.

The two levels do not override each other. Whichever limit is reached first is the one that removes files, so the effective retention is always the stricter of the two. A device set to keep 31 days of video will still lose footage after 3 days if the location it lives in is capped at a size that fills up in 3 days.

Choose one approach:

  • One shared limit for the whole drive: Enable management on the Storage Location and leave it disabled on each device. This is the simplest option and guarantees the drive never fills, but busy cameras will crowd out quiet ones.
  • Individual limits per camera: Disable management on the Storage Location and enable it on each device with its own Max Size and Max Age. Make sure the per-device limits add up to less than the free space on the drive.
  • Both: Enable management on both, with the location limit set high enough to act as a safety net (for example the free space on the drive) and the per-device limits controlling actual retention.
If recordings are disappearing sooner than expected, check the Server Settings - Storage location limits first, then check the logs for the storage management report which lists what was removed at each level.

Media Directory Settings

Multiple storage locations can be added in Agent DVR using the settings in Server Settings. Open Server Settings and select the Storage tab. Click Configure then click to add or edit a storage location. Each location acts as a base for device storage and has its own rules for size and file age.

Limits set here apply to the total of all devices recording into this location, not to each device separately. See the two levels of storage management above.

To manage a storage location:

  • Location: Path or UNC path to your storage location.
  • Default: Set as the default location for new devices.
  • Management: Enable storage management to automatically clear old content from this location as a whole. Leave this off if you want to control retention per device instead.
  • Max Size: Set a limit for this location's combined size across all devices in MB (0 = unlimited).
  • Max Age: Set a maximum file age in hours for all files in this location (0 = unlimited).
  • Delete to Recycle Bin: Opt to delete files to the recycle bin instead of permanent deletion (Windows only).
  • Network Storage: For Windows users, input details if authentication is required for your storage path.

Media Archive

Each storage location can be associated with an archive. Archives are usually large drives that hold recordings for a long period of time. Agent DVR can move recordings to the archive instead of deleting them.

To manage an archive location see Server Settings. Open Server Settings and select the Storage tab. Click Configure

  • Archive Location: Set a location for archiving recordings. See merge tags. You can also use {DIR} for the device's directory name and {GRABS} which resolves to "grabs/" if it's a photo or nothing if it's a recording.
  • Photos Location: Set a location for archiving photos. If blank, Agent DVR uses the main Archive Location.
  • Index Archived Files: Check this option to keep the file in the database with the new path to the archived location (recordings only).
  • Archive Expires: Option to delete archive content older than the set number of days. Set to 0 to disable. The process to check and delete archived content runs once a day (at midnight GMT).

Device Settings

Agent DVR also offers detailed storage settings for each device. Find these under the Storage tab when editing a device.

Per-device limits only apply to this device's own folder. If the Storage Location the device records into also has management enabled, the location's total limit still applies on top of these settings and may remove files sooner. See the two levels of storage management.
  • Location: Select one of the media locations defined in server settings.
  • Folder: Name of the folder within the location for this device's files.
  • Archive: Enable to move files to the archive location instead of deleting. Keep an eye on archive space. Locked files will not be archived.
  • Enabled: (under Storage Management) Toggle storage management for this device. Turn this on when you want individual retention rules for this device.
  • Max Size: Maximum size for this device's media folder (MB).
  • Max Age: Maximum age for files in this device's media folder (hours).