Uploaded Videos Deleted As Soon As They're Uploaded
Closed this issue · 10 comments
- Unifi Protect Backup version: 0.9.3
- Unifi Protect version: 2.8.35
- Python version: 3.10.12 (in Docker)
- Operating System: N/A
- Are you using a docker container or native?: I'm using the official Docker image
Description
As soon as Protect records motion or a smart detection, unifi-protect-backup uploads the file to Backblaze B2. That works as expected. If I restart the container, it will immediately start deleting recent recordings - even recordings from just a few minutes ago. This happens, despite my retention being set to "1y". Sometimes, and this is harder for me to reproduce, a restart isn't necessary for the recent clips to start getting deleted.
I have months of missing recordings that are gone from B2. I'm not sure if this helps, but footage from after Jan 14, 2023 seems to be all that's affected. Files prior to that date remain untouched.
What I Did
Here are the verbose logs (-vvv
) from right after a container restart. You can see a clip from just minutes prior (2023-07-29T01-12-52 smartDetectZone (person).mp4
) being deleted from B2:
unifi-protect-backup | [migrations] started
unifi-protect-backup | [migrations] no migrations found
unifi-protect-backup | cp: cannot stat '/root/.config/rclone/rclone.conf': No such file or directory
unifi-protect-backup | chown: changing ownership of '/config/rclone/rclone.conf': Read-only file system
unifi-protect-backup | usermod: no changes
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup | _____ __ __ _____ _____ _____ _____
unifi-protect-backup | | | | | __|_ _| | |
unifi-protect-backup | | --| | |__ | | | | | | | | |
unifi-protect-backup | |_____|_____|_____| |_| |_____|_|_|_|
unifi-protect-backup | _____ __ __ _ __ ____
unifi-protect-backup | | __ | | | | | | \
unifi-protect-backup | | __ -| | | | |__| | |
unifi-protect-backup | |_____|_____|_|_____|____/
unifi-protect-backup |
unifi-protect-backup | Based on images from linuxserver.io
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | To support LSIO projects visit:
unifi-protect-backup | https://www.linuxserver.io/donate/
unifi-protect-backup |
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup | GID/UID
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | User UID: 911
unifi-protect-backup | User GID: 911
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | [custom-init] No custom files found, skipping...
unifi-protect-backup | [ls.io-init] done.
unifi-protect-backup | vvv
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : Config:
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : address='REDACTED-IP-ADDRESS'
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : port=443
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : username='api-clip-backup'
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : password=REDACTED
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : verify_ssl=False
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_destination='enc_b2_paglusch-unifi-protect-clips:/'
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : retention='1y'
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_args=''
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_purge_args=''
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : ignore_cameras=()
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : verbose=3
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : detection_types=['motion', 'person', 'vehicle', 'ring']
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : file_structure_format='{camera_name}/{event.start:%Y-%m-%d}/{event.end:%Y-%m-%dT%H-%M-%S} {detection_type}.mp4'
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : sqlite_path='/config/database/events.sqlite'
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : download_buffer_size=512.0MiB
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : purge_interval='1d'
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : apprise_notifiers=()
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : skip_missing=False
unifi-protect-backup | 2023-07-29 06:13:29 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Starting...
unifi-protect-backup | 2023-07-29 06:13:29 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Checking rclone configuration...
unifi-protect-backup | 2023-07-29 06:13:29 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone found: /usr/bin/rclone
unifi-protect-backup | 2023-07-29 06:13:29 [EXTRA_DEBUG] unifi_protect_backup.utils : stdout:
unifi-protect-backup | b2_paglusch-unifi-protect-clips:
unifi-protect-backup | enc_b2_paglusch-unifi-protect-clips:
unifi-protect-backup | 2023-07-29 06:13:29 [EXTRA_DEBUG] unifi_protect_backup.utils : stderr:
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : Setting --config "/config/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : rclone: Version "v1.58.1-DEV" starting with parameters ["rclone" "listremotes" "-vv"]
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : Using config file from "/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : rclone: Version "v1.58.1-DEV" finishing with parameters ["rclone" "listremotes" "-vv"]
unifi-protect-backup | 2023-07-29 06:13:30 [EXTRA_DEBUG] unifi_protect_backup.utils : stdout:
unifi-protect-backup |
unifi-protect-backup | 2023-07-29 06:13:30 [EXTRA_DEBUG] unifi_protect_backup.utils : stderr:
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : Setting --config "/config/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : rclone: Version "v1.58.1-DEV" starting with parameters ["rclone" "mkdir" "-vv" "enc_b2_paglusch-unifi-protect-clips:/"]
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : Creating backend with remote "enc_b2_paglusch-unifi-protect-clips:/"
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : Using config file from "/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:29 DEBUG : Creating backend with remote "b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips"
unifi-protect-backup | 2023/07/29 06:13:30 DEBUG : fs cache: renaming cache item "b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips" to be canonical "b2_paglusch-unifi-protect-clips:paglusch-unifi-protect-clips"
unifi-protect-backup | 2023/07/29 06:13:30 DEBUG : fs cache: switching user supplied name "b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips" for canonical name "b2_paglusch-unifi-protect-clips:paglusch-unifi-protect-clips"
unifi-protect-backup | 2023/07/29 06:13:30 NOTICE: Encrypted drive 'enc_b2_paglusch-unifi-protect-clips:/': Warning: running mkdir on a remote which can't have empty directories does nothing
unifi-protect-backup | 2023/07/29 06:13:30 DEBUG : Encrypted drive 'enc_b2_paglusch-unifi-protect-clips:/': Making directory
unifi-protect-backup | 2023/07/29 06:13:30 DEBUG : 4 go routines active
unifi-protect-backup | 2023-07-29 06:13:30 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Connecting to Unifi Protect...
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] pyunifiprotect.api : Websocket re-connected successfully
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Found cameras:
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 63769c7a03047c03e70f4f79: Driveway - North
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6266dca80042cb03e703821c: Server Rack
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6266ddb602e0cb03e703823b: Living Room
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a34f01eb4203e70008a4: Back - West (Egress)
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 64875dc301f97103e40005ce: Doorbell
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a330035a4203e70008a1: Front Door
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a562028d4203e70008b2: Side - Southeast (Ellis)
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a32602bc4203e70008a0: Back - South (Bay Window)
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a36c03cf4203e70008a6: Side - West (Ellis)
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a33a02c14203e70008a3: Front - North (Tree)
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a36300f14203e70008a5: Driveway - East
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 62a7a09901e6fc03e706ed85: Side - North (AC)
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a31e01884203e700089f: Driveway - Northeast
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185c3a801304203e7000c02: Side - Southwest (Neighbor)
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 638a638b006fb103e403507c: Chloe TV™
unifi-protect-backup | 2023-07-29 06:13:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : NVR TZ: America/Chicago
unifi-protect-backup | 2023-07-29 06:13:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : Local TZ: UTC
unifi-protect-backup | 2023-07-29 06:13:31 [ DEBUG ] unifi_protect_backup.downloader : ffprobe found: /usr/bin/ffprobe
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Starting Tasks...
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.downloader : Starting Downloader
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.uploader : Starting Uploader
unifi-protect-backup | 2023-07-29 06:13:31 [ DEBUG ] unifi_protect_backup.event_listener : Subscribed to websocket
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.missing_event_checker : Starting Missing Event Checker
unifi-protect-backup | 2023-07-29 06:13:31 [EXTRA_DEBUG] unifi_protect_backup.missing_event_checker : Running check for missing events...
unifi-protect-backup | 2023-07-29 06:13:31 [ INFO ] unifi_protect_backup.purge : Purging event: 64c4add801599a03e400151e.
unifi-protect-backup | 2023-07-29 06:13:31 [ DEBUG ] unifi_protect_backup.purge : Deleted: enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-12-52 smartDetectZone (person).mp4
unifi-protect-backup | 2023-07-29 06:13:31 [ DEBUG ] unifi_protect_backup.missing_event_checker : Undownloaded events of wanted types: 0
unifi-protect-backup | 2023-07-29 06:13:33 [EXTRA_DEBUG] unifi_protect_backup.utils : stdout:
unifi-protect-backup |
unifi-protect-backup | 2023-07-29 06:13:33 [EXTRA_DEBUG] unifi_protect_backup.utils : stderr:
unifi-protect-backup | 2023/07/29 06:13:31 DEBUG : Setting --config "/config/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:31 DEBUG : rclone: Version "v1.58.1-DEV" starting with parameters ["rclone" "delete" "-vv" "enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-12-52 smartDetectZone (person).mp4"]
unifi-protect-backup | 2023/07/29 06:13:31 DEBUG : Creating backend with remote "enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-12-52 smartDetectZone (person).mp4"
unifi-protect-backup | 2023/07/29 06:13:31 DEBUG : Using config file from "/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:31 DEBUG : Creating backend with remote "b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips/61ih6s6dk4vnrmuhr9mc1t8s14/3292hg7dstouat43la6892c0do/4q6v4tr6plf50iman6bsj4m341hacejj9d1n4vvf6ibjoshh3dm0t7votuj7bs5glj3o6dvkpoa6ud1ef95iktcfqd7r967cthslan0"
unifi-protect-backup | 2023/07/29 06:13:32 DEBUG : fs cache: adding new entry for parent of "b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips/61ih6s6dk4vnrmuhr9mc1t8s14/3292hg7dstouat43la6892c0do/4q6v4tr6plf50iman6bsj4m341hacejj9d1n4vvf6ibjoshh3dm0t7votuj7bs5glj3o6dvkpoa6ud1ef95iktcfqd7r967cthslan0", "b2_paglusch-unifi-protect-clips:paglusch-unifi-protect-clips/61ih6s6dk4vnrmuhr9mc1t8s14/3292hg7dstouat43la6892c0do"
unifi-protect-backup | 2023/07/29 06:13:32 DEBUG : Waiting for deletions to finish
unifi-protect-backup | 2023/07/29 06:13:33 DEBUG : 2023-07-29T01-12-42 motion.mp4: Excluded
unifi-protect-backup | 2023/07/29 06:13:33 INFO : 2023-07-29T01-12-52 smartDetectZone (person).mp4: Deleted
unifi-protect-backup | 2023/07/29 06:13:33 DEBUG : 8 go routines active
unifi-protect-backup | 2023-07-29 06:13:33 [ INFO ] unifi_protect_backup.purge : Purging event: 64c4add8001c9a03e400151d.
unifi-protect-backup | 2023-07-29 06:13:33 [ DEBUG ] unifi_protect_backup.purge : Deleted: enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-12-42 motion.mp4
unifi-protect-backup | 2023-07-29 06:13:35 [EXTRA_DEBUG] unifi_protect_backup.utils : stdout:
unifi-protect-backup |
unifi-protect-backup | 2023-07-29 06:13:35 [EXTRA_DEBUG] unifi_protect_backup.utils : stderr:
unifi-protect-backup | 2023/07/29 06:13:33 DEBUG : Setting --config "/config/rclone/rclone.conf" from environment variable RCLONE_CONFIG="/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:33 DEBUG : rclone: Version "v1.58.1-DEV" starting with parameters ["rclone" "delete" "-vv" "enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-12-42 motion.mp4"]
unifi-protect-backup | 2023/07/29 06:13:33 DEBUG : Creating backend with remote "enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-12-42 motion.mp4"
unifi-protect-backup | 2023/07/29 06:13:33 DEBUG : Using config file from "/config/rclone/rclone.conf"
unifi-protect-backup | 2023/07/29 06:13:33 DEBUG : Creating backend with remote "b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips/61ih6s6dk4vnrmuhr9mc1t8s14/3292hg7dstouat43la6892c0do/ju14i6npbv9127af9eip3mm4o28kr6skl5a6qr01chc3b52ma2tg"
unifi-protect-backup | 2023/07/29 06:13:34 DEBUG : fs cache: adding new entry for parent of "b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips/61ih6s6dk4vnrmuhr9mc1t8s14/3292hg7dstouat43la6892c0do/ju14i6npbv9127af9eip3mm4o28kr6skl5a6qr01chc3b52ma2tg", "b2_paglusch-unifi-protect-clips:paglusch-unifi-protect-clips/61ih6s6dk4vnrmuhr9mc1t8s14/3292hg7dstouat43la6892c0do"
unifi-protect-backup | 2023/07/29 06:13:34 DEBUG : Waiting for deletions to finish
unifi-protect-backup | 2023/07/29 06:13:35 INFO : 2023-07-29T01-12-42 motion.mp4: Deleted
unifi-protect-backup | 2023/07/29 06:13:35 DEBUG : 8 go routines active
docker-compose.yml
unifi-protect-backup:
image: ghcr.io/ep1cman/unifi-protect-backup
container_name: unifi-protect-backup
restart: unless-stopped
environment:
- UFP_USERNAME=REDACTED
- UFP_PASSWORD=REDACTED
- UFP_ADDRESS=REDACTED
- UFP_SSL_VERIFY=false
- RCLONE_DESTINATION=enc_b2_paglusch-unifi-protect-clips:/
- RCLONE_RETENTION=1y
- VERBOSITY=vvv
volumes:
- ./unifi-protect-backup/data:/data
- ./unifi-protect-backup/db:/config/database
- ./unifi-protect-backup/config/rclone.conf:/config/rclone/rclone.conf:ro
rclone config
[b2_paglusch-unifi-protect-clips]
type = b2
account = REDACTED
key = REDACTED
hard_delete = true
[enc_b2_paglusch-unifi-protect-clips]
type = crypt
remote = b2_paglusch-unifi-protect-clips:/paglusch-unifi-protect-clips/
password = REDACTED
password2 = REDACTED
database (strangely empty?)
sqlite3 db/events.sqlite .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE events(id PRIMARY KEY, type, camera_id, start REAL, end REAL);
CREATE TABLE backups(id REFERENCES events(id) ON DELETE CASCADE, remote, path, PRIMARY KEY (id, remote));
COMMIT;
My friend @sardonicsloth and I are digging into the commits to see if a recent change may have introduced this. He's also affected by the same bug.
Here are some more logs (less verbose):
This shows two videos being uploaded. I walked in front of a camera to generate them:
unifi-protect-backup | [migrations] started
unifi-protect-backup | [migrations] no migrations found
unifi-protect-backup | cp: cannot stat '/root/.config/rclone/rclone.conf': No such file or directory
unifi-protect-backup | chown: changing ownership of '/config/rclone/rclone.conf': Read-only file system
unifi-protect-backup | usermod: no changes
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup | _____ __ __ _____ _____ _____ _____
unifi-protect-backup | | | | | __|_ _| | |
unifi-protect-backup | | --| | |__ | | | | | | | | |
unifi-protect-backup | |_____|_____|_____| |_| |_____|_|_|_|
unifi-protect-backup | _____ __ __ _ __ ____
unifi-protect-backup | | __ | | | | | | \
unifi-protect-backup | | __ -| | | | |__| | |
unifi-protect-backup | |_____|_____|_|_____|____/
unifi-protect-backup |
unifi-protect-backup | Based on images from linuxserver.io
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | To support LSIO projects visit:
unifi-protect-backup | https://www.linuxserver.io/donate/
unifi-protect-backup |
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup | GID/UID
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | User UID: 911
unifi-protect-backup | User GID: 911
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | [custom-init] No custom files found, skipping...
unifi-protect-backup | [ls.io-init] done.
unifi-protect-backup | v
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : Config:
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : address='10.151.160.2'
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : port=443
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : username='api-clip-backup'
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : password=REDACTED
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : verify_ssl=False
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_destination='enc_b2_paglusch-unifi-protect-clips:/'
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : retention='1y'
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_args=''
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_purge_args=''
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : ignore_cameras=()
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : verbose=1
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : detection_types=['motion', 'person', 'vehicle', 'ring']
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : file_structure_format='{camera_name}/{event.start:%Y-%m-%d}/{event.end:%Y-%m-%dT%H-%M-%S} {detection_type}.mp4'
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : sqlite_path='/config/database/events.sqlite'
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : download_buffer_size=512.0MiB
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : purge_interval='1d'
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : apprise_notifiers=()
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : skip_missing=False
unifi-protect-backup | 2023-07-29 06:40:04 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Starting...
unifi-protect-backup | 2023-07-29 06:40:04 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Checking rclone configuration...
unifi-protect-backup | 2023-07-29 06:40:04 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone found: /usr/bin/rclone
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Connecting to Unifi Protect...
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Found cameras:
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 63769c7a03047c03e70f4f79: Driveway - North
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6266dca80042cb03e703821c: Server Rack
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6266ddb602e0cb03e703823b: Living Room
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a34f01eb4203e70008a4: Back - West (Egress)
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 64875dc301f97103e40005ce: Doorbell
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a330035a4203e70008a1: Front Door
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a562028d4203e70008b2: Side - Southeast (Ellis)
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a32602bc4203e70008a0: Back - South (Bay Window)
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a36c03cf4203e70008a6: Side - West (Ellis)
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a33a02c14203e70008a3: Front - North (Tree)
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a36300f14203e70008a5: Driveway - East
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 62a7a09901e6fc03e706ed85: Side - North (AC)
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a31e01884203e700089f: Driveway - Northeast
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185c3a801304203e7000c02: Side - Southwest (Neighbor)
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 638a638b006fb103e403507c: Chloe TV™
unifi-protect-backup | 2023-07-29 06:40:05 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : NVR TZ: America/Chicago
unifi-protect-backup | 2023-07-29 06:40:05 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : Local TZ: UTC
unifi-protect-backup | 2023-07-29 06:40:05 [ DEBUG ] unifi_protect_backup.downloader : ffprobe found: /usr/bin/ffprobe
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Starting Tasks...
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.downloader : Starting Downloader
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.uploader : Starting Uploader
unifi-protect-backup | 2023-07-29 06:40:05 [ DEBUG ] unifi_protect_backup.event_listener : Subscribed to websocket
unifi-protect-backup | 2023-07-29 06:40:05 [ INFO ] unifi_protect_backup.missing_event_checker : Starting Missing Event Checker
unifi-protect-backup | 2023-07-29 06:40:05 [ DEBUG ] unifi_protect_backup.missing_event_checker : Undownloaded events of wanted types: 0
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.event_listener : Adding event 64c4b478014f9a03e400156f to queue (Current download queue=1)
unifi-protect-backup | 2023-07-29 06:41:08 [ INFO ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Downloading event: 64c4b478014f9a03e400156f
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Remaining Download Queue: 0
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Video Download Buffer: 0.0B/512.0MiB
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Camera: Living Room
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Type: smartDetectZone (person)
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Start: 2023-07-29T01-40-53 (1690612853.153)
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] End: 2023-07-29T01-41-08 (1690612868.33)
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Duration: 15.177s
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Sleeping (7.363067s) to ensure clip is ready to download...
unifi-protect-backup | 2023-07-29 06:41:08 [ DEBUG ] unifi_protect_backup.event_listener : Adding event 64c4b47b01319a03e4001570 to queue (Current download queue=1)
unifi-protect-backup | 2023-07-29 06:41:15 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Downloading video...
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Downloaded video size: 12.4MiBs
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Downloaded video length: 18.889s(+3.712s)
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b478014f9a03e400156f] Added to upload queue
unifi-protect-backup | 2023-07-29 06:41:16 [ INFO ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Downloading event: 64c4b47b01319a03e4001570
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Remaining Download Queue: 0
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Video Download Buffer: 12.4MiB/512.0MiB
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Camera: Living Room
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Type: motion
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Start: 2023-07-29T01-40-56 (1690612856.154)
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] End: 2023-07-29T01-41-01 (1690612861.155)
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Duration: 5.001s
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Downloading video...
unifi-protect-backup | 2023-07-29 06:41:16 [ INFO ] unifi_protect_backup.uploader : [64c4b478014f9a03e400156f] Uploading event: 64c4b478014f9a03e400156f
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.uploader : [64c4b478014f9a03e400156f] Remaining Upload Queue: 0 (0.0B)
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.uploader : [64c4b478014f9a03e400156f] Destination: enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-41-08 smartDetectZone (person).mp4
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Downloaded video size: 4.3MiBs
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Downloaded video length: 6.722s(+1.721s)
unifi-protect-backup | 2023-07-29 06:41:16 [ DEBUG ] unifi_protect_backup.downloader : [64c4b47b01319a03e4001570] Added to upload queue
unifi-protect-backup | 2023-07-29 06:41:27 [ DEBUG ] unifi_protect_backup.uploader : [64c4b478014f9a03e400156f] Uploaded
unifi-protect-backup | 2023-07-29 06:41:27 [ INFO ] unifi_protect_backup.uploader : [64c4b47b01319a03e4001570] Uploading event: 64c4b47b01319a03e4001570
unifi-protect-backup | 2023-07-29 06:41:27 [ DEBUG ] unifi_protect_backup.uploader : [64c4b47b01319a03e4001570] Remaining Upload Queue: 0 (0.0B)
unifi-protect-backup | 2023-07-29 06:41:27 [ DEBUG ] unifi_protect_backup.uploader : [64c4b47b01319a03e4001570] Destination: enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-41-01 motion.mp4
unifi-protect-backup | 2023-07-29 06:41:32 [ DEBUG ] unifi_protect_backup.uploader : [64c4b47b01319a03e4001570] Uploaded
unifi-protect-backup | 2023-07-29 06:45:06 [ DEBUG ] unifi_protect_backup.missing_event_checker : Undownloaded events of wanted types: 0
After a container restart, the clip is deleted almost immediately:
unifi-protect-backup | [migrations] started
unifi-protect-backup | [migrations] no migrations found
unifi-protect-backup | cp: cannot stat '/root/.config/rclone/rclone.conf': No such file or directory
unifi-protect-backup | chown: changing ownership of '/config/rclone/rclone.conf': Read-only file system
unifi-protect-backup | usermod: no changes
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup | _____ __ __ _____ _____ _____ _____
unifi-protect-backup | | | | | __|_ _| | |
unifi-protect-backup | | --| | |__ | | | | | | | | |
unifi-protect-backup | |_____|_____|_____| |_| |_____|_|_|_|
unifi-protect-backup | _____ __ __ _ __ ____
unifi-protect-backup | | __ | | | | | | \
unifi-protect-backup | | __ -| | | | |__| | |
unifi-protect-backup | |_____|_____|_|_____|____/
unifi-protect-backup |
unifi-protect-backup | Based on images from linuxserver.io
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | To support LSIO projects visit:
unifi-protect-backup | https://www.linuxserver.io/donate/
unifi-protect-backup |
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup | GID/UID
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | User UID: 911
unifi-protect-backup | User GID: 911
unifi-protect-backup | ───────────────────────────────────────
unifi-protect-backup |
unifi-protect-backup | [custom-init] No custom files found, skipping...
unifi-protect-backup | [ls.io-init] done.
unifi-protect-backup | v
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : Config:
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : address='10.151.160.2'
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : port=443
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : username='api-clip-backup'
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : password=REDACTED
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : verify_ssl=False
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_destination='enc_b2_paglusch-unifi-protect-clips:/'
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : retention='1y'
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_args=''
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone_purge_args=''
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : ignore_cameras=()
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : verbose=1
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : detection_types=['motion', 'person', 'vehicle', 'ring']
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : file_structure_format='{camera_name}/{event.start:%Y-%m-%d}/{event.end:%Y-%m-%dT%H-%M-%S} {detection_type}.mp4'
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : sqlite_path='/config/database/events.sqlite'
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : download_buffer_size=512.0MiB
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : purge_interval='1d'
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : apprise_notifiers=()
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : skip_missing=False
unifi-protect-backup | 2023-07-29 06:46:51 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Starting...
unifi-protect-backup | 2023-07-29 06:46:51 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Checking rclone configuration...
unifi-protect-backup | 2023-07-29 06:46:51 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : rclone found: /usr/bin/rclone
unifi-protect-backup | 2023-07-29 06:46:52 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Connecting to Unifi Protect...
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Found cameras:
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 63769c7a03047c03e70f4f79: Driveway - North
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6266dca80042cb03e703821c: Server Rack
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6266ddb602e0cb03e703823b: Living Room
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a34f01eb4203e70008a4: Back - West (Egress)
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 64875dc301f97103e40005ce: Doorbell
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a330035a4203e70008a1: Front Door
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a562028d4203e70008b2: Side - Southeast (Ellis)
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a32602bc4203e70008a0: Back - South (Bay Window)
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a36c03cf4203e70008a6: Side - West (Ellis)
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a33a02c14203e70008a3: Front - North (Tree)
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a36300f14203e70008a5: Driveway - East
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 62a7a09901e6fc03e706ed85: Side - North (AC)
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185a31e01884203e700089f: Driveway - Northeast
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 6185c3a801304203e7000c02: Side - Southwest (Neighbor)
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : - 638a638b006fb103e403507c: Chloe TV™
unifi-protect-backup | 2023-07-29 06:46:53 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : NVR TZ: America/Chicago
unifi-protect-backup | 2023-07-29 06:46:53 [ DEBUG ] unifi_protect_backup.unifi_protect_backup_core : Local TZ: UTC
unifi-protect-backup | 2023-07-29 06:46:53 [ DEBUG ] unifi_protect_backup.downloader : ffprobe found: /usr/bin/ffprobe
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Starting Tasks...
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.downloader : Starting Downloader
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.uploader : Starting Uploader
unifi-protect-backup | 2023-07-29 06:46:53 [ DEBUG ] unifi_protect_backup.event_listener : Subscribed to websocket
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.missing_event_checker : Starting Missing Event Checker
unifi-protect-backup | 2023-07-29 06:46:53 [ INFO ] unifi_protect_backup.purge : Purging event: 64c4b478014f9a03e400156f.
unifi-protect-backup | 2023-07-29 06:46:53 [ DEBUG ] unifi_protect_backup.purge : Deleted: enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-41-08 smartDetectZone (person).mp4
unifi-protect-backup | 2023-07-29 06:46:53 [ DEBUG ] unifi_protect_backup.missing_event_checker : Undownloaded events of wanted types: 0
unifi-protect-backup | 2023-07-29 06:46:55 [ INFO ] unifi_protect_backup.purge : Purging event: 64c4b47b01319a03e4001570.
unifi-protect-backup | 2023-07-29 06:46:55 [ DEBUG ] unifi_protect_backup.purge : Deleted: enc_b2_paglusch-unifi-protect-clips:/Living Room/2023-07-29/2023-07-29T01-41-01 motion.mp4
Unifi Protect Backup version: 0.9.3, 0.8.0, 0.8.8
Unifi Protect version: 2.8.35
Python version: 3.10.12 (in Docker)
Operating System: N/A
Are you using a docker container or native?: I'm using the official Docker image
It should be noted that this is a fresh install - no previous install was done. Setting this up tonight and have the same issue here.
this is a fresh install of version 0.8.0. Complete logs from startup to the event purging. I started the container, triggered an event and watched it upload and then delete the event.
[root@nh-docker01 docker]# docker-compose logs -f --tail 100 unifi-nvr-backup
unifi-nvr-backup | [custom-init] No custom services found, skipping...
unifi-nvr-backup | cont-init: info: running /etc/cont-init.d/30-config
unifi-nvr-backup | [migrations] started
unifi-nvr-backup | [migrations] no migrations found
unifi-nvr-backup | cp: cannot stat '/root/.config/rclone/rclone.conf': No such file or directory
unifi-nvr-backup | chown: changing ownership of '/config/rclone/rclone.conf': Read-only file system
unifi-nvr-backup | cont-init: info: /etc/cont-init.d/30-config exited 0
unifi-nvr-backup | usermod: no changes
unifi-nvr-backup |
unifi-nvr-backup | -------------------------------------
unifi-nvr-backup | _ ()
unifi-nvr-backup | | | ___ _ __
unifi-nvr-backup | | | / __| | | / \
unifi-nvr-backup | | | \__ \ | | | () |
unifi-nvr-backup | |_| |___/ |_| \__/
unifi-nvr-backup |
unifi-nvr-backup |
unifi-nvr-backup | Brought to you by linuxserver.io
unifi-nvr-backup | -------------------------------------
unifi-nvr-backup |
unifi-nvr-backup | To support LSIO projects visit:
unifi-nvr-backup | https://www.linuxserver.io/donate/
unifi-nvr-backup | -------------------------------------
unifi-nvr-backup | GID/UID
unifi-nvr-backup | -------------------------------------
unifi-nvr-backup |
unifi-nvr-backup | User uid: 911
unifi-nvr-backup | User gid: 911
unifi-nvr-backup | -------------------------------------
unifi-nvr-backup |
unifi-nvr-backup | [custom-init] No custom files found, skipping...
unifi-nvr-backup | services-up: info: copying legacy longrun unifi-protect-backup (no readiness notification)
unifi-nvr-backup | [ls.io-init] done.
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : Config:
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : address='nvr.nave.house'
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : port=443
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : username='nvrbackups'
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : password=REDACTED
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : verify_ssl=True
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : rclone_destination='b2_nvr_backups:/nave-nvr-backup'
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : retention='1y'
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : rclone_args=''
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : ignore_cameras=()
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : verbose=1
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : detection_types=['person', 'vehicle', 'ring']
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : file_structure_format='{camera_name}/{event.start:%Y-%m-%d}/{event.end:%Y-%m-%dT%H-%M-%S} {detection_type}.mp4'
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : sqlite_path='/config/database/events.sqlite'
unifi-nvr-backup | 2023-07-29 06:34:31 [ INFO ] unifi_protect_backup.unifi_protect_backup : Starting...
unifi-nvr-backup | 2023-07-29 06:34:31 [ INFO ] unifi_protect_backup.unifi_protect_backup : Checking rclone configuration...
unifi-nvr-backup | 2023-07-29 06:34:31 [ DEBUG ] unifi_protect_backup.unifi_protect_backup : rclone found: /usr/bin/rclone
unifi-nvr-backup | 2023-07-29 06:34:32 [ INFO ] unifi_protect_backup.unifi_protect_backup : Connecting to Unifi Protect...
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : Found cameras:
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64b5907d01612603e400e149: Upper Backyard
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 645819fd01714703e40014b4: Stairwell Main Floor
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64555e80038f5d03e40003f2: Patio Cam
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64b5a95502ce2603e400ec31: Front Door
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 649f1f400212bb03e40003ef: Yard AC Side
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64a60a2c039bf503e40004e9: Utility Room
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64a609d2024af503e40004cf: Kitchen
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64a609f1034cf503e40004d8: Josh Office
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64a5e2c700d86603e400177f: Backyard Kids Side
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64a60a1003dbf503e40004e3: Boys Play Room
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64b59041018b2603e400e140: Backyard South
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64b599dd01be2603e400e4e9: Living Room
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 649f1f400242bb03e40003f0: Jess Driveway
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64b5904101612603e400e13e: Front Porch
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 64b5904101772603e400e13f: Garage
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : - 649f1f40025fbb03e40003f1: Driveway
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : Database doesn't exist, creating a new one
unifi-nvr-backup | 2023-07-29 06:34:34 [ DEBUG ] unifi_protect_backup.downloader : ffprobe found: /usr/bin/ffprobe
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.unifi_protect_backup : Starting...
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.downloader : Starting Downloader
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.uploader : Starting Uploader
unifi-nvr-backup | 2023-07-29 06:34:34 [ DEBUG ] unifi_protect_backup.event_listener : Subscribed to websocket
unifi-nvr-backup | 2023-07-29 06:34:34 [ INFO ] unifi_protect_backup.missing_event_checker : Starting Missing Event Checker
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.event_listener : Adding event 64c4b331007dc103e400f6d6 to queue (Current download queue=1)
unifi-nvr-backup | 2023-07-29 06:37:30 [ INFO ] unifi_protect_backup.downloader : Downloading event: 64c4b331007dc103e400f6d6
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : Remaining Download Queue: 0
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : Video Download Buffer: 0.0B/256.0MiB
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : Camera: Josh Office
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : Type: smartDetectZone (person)
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : Start: 2023-07-29T01-35-25 (1690612525.994)
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : End: 2023-07-29T01-37-20 (1690612640.222)
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : Duration: 114.228s
unifi-nvr-backup | 2023-07-29 06:37:30 [ DEBUG ] unifi_protect_backup.downloader : Downloading video...
unifi-nvr-backup | 2023-07-29 06:37:32 [ DEBUG ] unifi_protect_backup.downloader : Downloaded video size: 49.0MiBs
unifi-nvr-backup | 2023-07-29 06:37:32 [ DEBUG ] unifi_protect_backup.downloader : Downloaded video length: 114.667s(+0.439s)
unifi-nvr-backup | 2023-07-29 06:37:32 [ DEBUG ] unifi_protect_backup.downloader : Added to upload queue
unifi-nvr-backup | 2023-07-29 06:37:32 [ INFO ] unifi_protect_backup.uploader : Uploading event: 64c4b331007dc103e400f6d6
unifi-nvr-backup | 2023-07-29 06:37:32 [ DEBUG ] unifi_protect_backup.uploader : Remaining Upload Queue: 0
unifi-nvr-backup | 2023-07-29 06:37:32 [ DEBUG ] unifi_protect_backup.uploader : Destination: b2_nvr_backups:/nave-nvr-backup/Josh Office/2023-07-29/2023-07-29T01-37-20 smartDetectZone (person).mp4
unifi-nvr-backup | 2023-07-29 06:38:02 [ DEBUG ] unifi_protect_backup.uploader : Uploaded
unifi-nvr-backup | 2023-07-29 06:38:34 [ INFO ] unifi_protect_backup.purge : Purging event: 64c4b331007dc103e400f6d6.
unifi-nvr-backup | 2023-07-29 06:38:34 [ DEBUG ] unifi_protect_backup.purge : Deleted: b2_nvr_backups:/nave-nvr-backup/Josh Office/2023-07-29/2023-07-29T01-37-20 smartDetectZone (person).mp4
Leaving the tail for the container -- i did an ls on the endpoint:
[root@nh-docker01 docker]# rclone ls b2_nvr_backups:/nave-nvr-backup/
13515312 Driveway/2023-07-29/2023-07-29T01-10-18 motion.mp4
12759203 Driveway/2023-07-29/2023-07-29T01-11-58 motion.mp4
11249171 Driveway/2023-07-29/2023-07-29T01-13-12 motion.mp4
19001441 Driveway/2023-07-29/2023-07-29T01-16-57 motion.mp4
19444028 Driveway/2023-07-29/2023-07-29T01-18-02 motion.mp4
14104040 Yard AC Side/2023-07-29/2023-07-29T01-18-13 motion.mp4
Here is my compose file:
unifi-nvr-backup:
image: ghcr.io/ep1cman/unifi-protect-backup:0.8.0
container_name: unifi-nvr-backup
volumes:
- /opt/docker/config/unifi-nvr-backup/data:/data
- /opt/docker/config/unifi-nvr-backup/database:/config/database
- /opt/docker/config/unifi-nvr-backup/rclone/rclone.conf:/config/rclone/rclone.conf:ro
environment:
- UFP_USERNAME=redacted
- UFP_PASSWORD=redacted
- UFP_ADDRESS=redacted
- RCLONE_RETENTION=1y
- RCLONE_DESTINATION=b2_nvr_backups:/nave-nvr-backup
- SKIP_MISSING=false
- DETECTION_TYPES=person,vehicle,ring
restart: unless-stopped
I have tried version 0.8.0, 0.8.8 and 0.9.3 all with the same results. No database entries are created at all when looking at the events.sqlite database created by the application. Please let me know if you need more information.
@sardonicsloth's and my theory is that v0.8.0 is when the issue was introduced. Since we both have empty databases (for unknown reasons so far), our uploaded files are being purged.
The release notes seem to suggest this might be the case, since the database is now used instead of the file timestamps:
Pruning is no longer done based on file timestamps, the database is used instead. The tool will no longer delete files it didn't create.
More developments:
I checked the sqlite DB and saw that there was an entry(!):
sqlite3 unifi-protect-backup/db/events.sqlite .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE events(id PRIMARY KEY, type, camera_id, start REAL, end REAL);
INSERT INTO events VALUES('64c4b9f502669a03e40015c3','motion','6185a330035a4203e70008a1',1690614258.4969999789,1690614265.1970000267);
CREATE TABLE backups(id REFERENCES events(id) ON DELETE CASCADE, remote, path, PRIMARY KEY (id, remote));
INSERT INTO backups VALUES('64c4b9f502669a03e40015c3','enc_b2_paglusch-unifi-protect-clips','/Front Door/2023-07-29/2023-07-29T02-04-25 motion.mp4');
COMMIT;
I restarted the container:
[...]
unifi-protect-backup | 2023-07-29 07:05:23 [ INFO ] unifi_protect_backup.unifi_protect_backup_core : Starting Tasks...
unifi-protect-backup | 2023-07-29 07:05:23 [ INFO ] unifi_protect_backup.downloader : Starting Downloader
unifi-protect-backup | 2023-07-29 07:05:23 [ INFO ] unifi_protect_backup.uploader : Starting Uploader
unifi-protect-backup | 2023-07-29 07:05:23 [ DEBUG ] unifi_protect_backup.event_listener : Subscribed to websocket
unifi-protect-backup | 2023-07-29 07:05:23 [ INFO ] unifi_protect_backup.missing_event_checker : Starting Missing Event Checker
unifi-protect-backup | 2023-07-29 07:05:23 [ INFO ] unifi_protect_backup.purge : Purging event: 64c4b9f502669a03e40015c3.
unifi-protect-backup | 2023-07-29 07:05:23 [ DEBUG ] unifi_protect_backup.purge : Deleted: enc_b2_paglusch-unifi-protect-clips:/Front Door/2023-07-29/2023-07-29T02-04-25 motion.mp4
unifi-protect-backup | 2023-07-29 07:05:23 [ DEBUG ] unifi_protect_backup.missing_event_checker : Undownloaded events of wanted types: 0
And now the clip is deleted from Backblaze B2 and the database is empty again:
sqlite3 unifi-protect-backup/db/events.sqlite .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE events(id PRIMARY KEY, type, camera_id, start REAL, end REAL);
CREATE TABLE backups(id REFERENCES events(id) ON DELETE CASCADE, remote, path, PRIMARY KEY (id, remote));
COMMIT;
i think here is the problem? this should be a lower case 'y'
Things seem to be working better by using 365d
instead of 1y
for the retention. However now I'm getting bit by #95. That wasn't happening until I switch the retention. Strange..
Can you please try the latest release to see if that addresses this issue
The latest release seems to have resolved the issue for me. I'm no longer seeing footage being deleted erroneously. @sardonicsloth can you test too before we close this issue?
I am on the latest version 0.9.4 however i have yet to switch back to year. It seems fine so far to me i don't want to risk deleting everything i have backed up now so once it catches up ill point it to a new bucket after its done.
LGTM -- using 1y i no longer have the removal of videos as they are uploaded