https://github.com/wasted-engineer/frigate-alerts-backup
Script to make backups of frigate video alerts
https://github.com/wasted-engineer/frigate-alerts-backup
chatgpt frigate
Last synced: 3 months ago
JSON representation
Script to make backups of frigate video alerts
- Host: GitHub
- URL: https://github.com/wasted-engineer/frigate-alerts-backup
- Owner: Wasted-Engineer
- Created: 2025-03-17T19:16:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-25T18:28:09.000Z (over 1 year ago)
- Last Synced: 2025-03-25T19:31:30.050Z (over 1 year ago)
- Topics: chatgpt, frigate
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ฆ Frigate Alerts Backup Script
> ๐ This script is a small gift โ created with the help of ChatGPT โ for the Frigate community.
> It is provided "as is", with no guarantees. Use at your own risk.
---
## ๐ What does it do?
This Bash script creates daily backups of Frigate alerts, saving both:
- ๐ฅ **Alert footage** โ Frigate records videos as a series of short 10-second clips. This script copies the raw 10-second fragments that cover the alert period, not a single continuous video.
- ๐ **Metadata** โ Event ID, camera name, timestamp, and clip availability.
It pulls data directly from the Frigate SQLite database and copies the corresponding video fragments to a mounted destination folder of your choice (e.g., USB drive, network share, or any accessible storage).
---
## โ๏ธ How it works
1. Creates a backup of your Frigate SQLite database.
2. Parses today's alerts, identifying which have video clips.
3. Finds the 10-second video fragments closest to the alert start time.
4. Copies those fragments to the configured destination folder.
This script runs manually by default, but it can be automated easily with tools like `cron` or `systemd`.
---
## ๐ File Overview
- `backup_alerts.sh` โ original version in **Spanish**
- `backup_alerts_en.sh` โ translated and cleaned-up **English version**
---
## โ
Requirements
- A working Frigate setup (with recording enabled)
- SQLite3 installed
- USB or storage destination mounted
- Basic Linux shell environment
---
## ๐งช Tested With
- โ
4 camera setup
- โ
Local Frigate instance
- โ
Daily manual execution
---
## ๐ Example usage (manual)
```bash
bash backup_alerts_en.sh
๐ฌ Feedback
If you find it useful, feel free to โญ the repo or share it with others.
Pull requests and improvements are welcome!
๐ Thanks
Huge thanks to the Frigate project and its community for the tools and inspiration.