UniFi-Protect-Backup

Docker app from ep1cman's Repository

Overview

A Python based tool for backing up UniFi Protect event clips as they occur to cloud storage. By default it will backup clips locally to `/data` inside the container. However you can create an `rclone` config file to backup to dozens of cloud providers. You can do this by running the following commands: ``` $ mkdir -p /mnt/user/appdata/unifi-protect-backup/config $ docker run -it --rm -v /mnt/user/appdata/unifi-protect-backup/config:/root/.config/rclone --entrypoint rclone ghcr.io/ep1cman/unifi-protect-backup config ``` Use the interactive configuration tool to setup your desired backup destination. Once complete you can start the container ensuring that the `RCLONE_DESTINATION` uses the name of your rclone remote e.g `MyDropbox:/path/on/dropbx` NOTE: If you are using the `local` remote type, the path set in `RCLONE_DESTINATION` will be inside the container so please use `/data`. You then need to set the optional "Clip directory" below to where you actually want the data to be stored.

Runtime arguments

Network
bridge
Shell
sh
Privileged
false

Template configuration

TimeZoneVariable

TimeZone for the container refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of possible timezones

Target
TZ
Default
UTC
UniFi Protect usernameVariable

Username to login to Unifi Protect instance

Target
UFP_USERNAME
UniFi Protect passwordVariable

Password for Unifi Protect user

Target
UFP_PASSWORD
UniFi Protect addressVariable

Address of Unifi Protect instance

Target
UFP_ADDRESS
UniFi Protect portVariable

Port of Unifi Protect instance

Target
UFP_PORT
Default
443
Verify SSL certificateVariable

Set to false if your UniFi protect instances doesn't have a valid SSL certificate

Target
UFP_SSL_VERIFY
Default
false
Clip retention periodVariable

How long should event clips be backed up for. Format as per the `--max-age` argument of `rclone` (https://rclone.org/filtering/#max-age-don-t-transfer-any-file-older-than-this)

Target
RCLONE_RETENTION
Default
7d
rclone destinationVariable

`rclone` destination path in the format {rclone remote}:{path on remote}. E.g.`gdrive:/backups/unifi_protect`

Target
RCLONE_DESTINATION
Default
local:/data
Ignore CamerasVariable

IDs of the cameras you want unifi-protect-backup to ignore. A list of camera IDs will be appear at the start of the log

Target
IGNORE_CAMERAS
Logging VerbosityVariable

More `v`s = more verbost logging

Target
VERBOSITY
Default
v
rclone argsVariable

Optional arguments which are directly passed to `rclone rcat`. See the `rclone` documentation for the full set of arguments it supports (https://rclone.org/docs/)

Target
RCLONE_ARGS
Rclone ConfigPathr

Location of rclone configuration files

Target
/config/rclone
Default
/mnt/user/appdata/unifi-protect-backup/rclone/
Value
/mnt/user/appdata/unifi-protect-backup/rclone/
Database directoryPathr

Location to save the SQLite events database

Target
/config/database
Default
/mnt/user/appdata/unifi-protect-backup/database/
Value
/mnt/user/appdata/unifi-protect-backup/database/
Clip directoryPathr

ONLY USED WITH LOCAL RCLONE REMOTE

Target
/data
Default
/mnt/user/appdata/unifi-protect-backup/clips
Value
/mnt/user/appdata/unifi-protect-backup/clips

Categories

Details

Repository
ghcr.io/ep1cman/unifi-protect-backup:latest
Last Updated2026-05-31
First Seen2022-02-24

Run UniFi-Protect-Backup on Unraid.

UniFi-Protect-Backup is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.