v5.2.0 - Backup Overhaul, Outage Export, verify.sh Fixes & More
Backup Script Improvements
- InfluxDB consistent snapshots — the backup script now archives the InfluxDB snapshot (via
influxd backup -portable) instead of tarring the liveinfluxdb/directory while InfluxDB is actively writing. This eliminates thefile changed as we read itwarnings and eliminates the risk of archive corruption from concurrent writes. The-portableflag produces a version-independent snapshot that can be restored reliably on any InfluxDB 1.x instance. - Grafana database backup —
grafana.dbis now backed up usingsqlite3 .backup(SQLite's online backup API) for a consistent copy. Falls back tocp -aif sqlite3 is not installed on the host, with a hint tosudo apt install sqlite3. - Configuration files backup — all
.env,.conf, and.yml/.yamlfiles at the dashboard root are now included in the archive, making disaster recovery straightforward. A fixedCONFIG_FILESarray guarantees essentials (compose.env,pypowerwall.env,telegraf.local, etc.) are always captured; globs catch anything additional. - Staging directory with trap cleanup — the script uses
mktemp -dfor staging with a trap to clean up on exit. - Proper quoting — all variable references are properly quoted throughout the script.
New Features
- Outage export script —
tools/export_outages/export_outages.pyby @ondrejch exports grid outage data from InfluxDB as CSV. Readsgrid_statusfrompowerwall.grid.http, merges consecutive readings into outage intervals, and outputs columns: StartTime, EndTime, DurationMinutes, StatusValue. Supportsall,today,yesterday, or custom date ranges. (PR #833)
Bug Fixes
- verify.sh
--debugmode andbcfix — adds--debugflag that disablesset -eand enablesset -xtracing so users can see exactly where the script fails. Makes thebccall non-fatal — ifbcis not installed, falls back to the raw battery level with a visible warning instead of silently killing the script. Fixes #827 reported by @hatchjdecho. (PR #834)
Documentation
- Debian Docker installation instructions — adds a Debian section to
tools/DOCKER.mdwith steps tested on Debian Trixie (v13), including the correct Docker GPG key and apt repository paths. Based on testing by @JonMurphy. (#831, PR #832)
Backup Archive Structure
influxdb/ # InfluxDB portable snapshot (metadata + shard data)
grafana/ # grafana.db (consistent copy) + provisions/
config/ # .env, .conf, .yml/.yaml configuration files
Files Changed
backups/backup.sh.sample— rewritten with three-part backup approachbackups/README.md— updated backup format description, restore instructions, and automation guidetools/export_outages/export_outages.py— new outage export tooltools/export_outages/README.md— usage documentationtools/DOCKER.md— Debian installation instructionsverify.sh—--debugmode and non-fatalbcVERSION—5.1.7→5.2.0upgrade.sh— version consistency
Contributors
Thanks to the community members who made this release possible:
- @JonMurphy — reported the backup corruption issue (#825), tested every iteration of the backup script, suggested the
-portableflag, reviewed config backup scope, tested Debian Docker instructions (#831), and confirmed the final build A-OK - @hulkster — verified weather data backup coverage and asked about historical weather import options
- @ondrejch — contributed the outage export script
export_outages.py(PR #833) - @hatchjdecho — reported the verify.sh silent exit bug (#827) with detailed troubleshooting