# Required — hostname or IP of your Protect device (CloudKey, UCG, UDM, UNVR, etc.) PROTECT_HOST= # SSH user (root for most devices, may differ on standalone UNVRs) PROTECT_SSH_USER=root # Fallback video path if the DB-reported folder is not accessible PROTECT_VIDEO_PATH=/srv/unifi-protect/video # PostgreSQL settings PROTECT_DB_PORT=5433 PROTECT_DB_NAME=unifi-protect # How many hours back to look for recordings BACKUP_HOURS=1 # Which recording channels to back up (comma-separated) # 0 = main high-res stream, 2 = low-quality sub-stream BACKUP_CHANNELS=0 # SCP batching — copy N files, then pause BATCH_DELAY seconds BATCH_SIZE=5 BATCH_DELAY=30 # Required — host path where archived .mp4 files are stored ARCHIVE_PATH= # Host path to SSH keys (must contain a key authorized on the Protect device) SSH_KEY_PATH=~/.ssh # Cron schedule (default: every 15 minutes) # Do not quote this value — Docker Compose includes quotes literally CRON_SCHEDULE=*/15 * * * * # Run a backup immediately on container start RUN_ON_START=true # Timezone TZ=UTC # Log level: debug, info, warn, error LOG_LEVEL=info # Retention: delete footage older than N days (disabled if unset) # RETENTION_DAYS=90 # Retention: max archive size in GB — prune oldest footage when archive exceeds this # Measures the archive directory only, safe on shared volumes # MAX_ARCHIVE_SIZE=9000 # Retention: prune oldest footage when total disk usage exceeds N% (disabled if unset) # Measures the entire filesystem — on shared volumes, other data counts toward the threshold # RETENTION_PERCENT=85