Skip to content

Conversation

@Nerivec
Copy link
Collaborator

@Nerivec Nerivec commented Nov 10, 2025

Supersedes #1526

Creates a "backup-2025-01-01.01-01-01" folder (with database.db & coordinator-backup.json) before:

  • adapter "reset" triggers a wipe of previous data from controller
  • controller backup
    • when triggered by stop

Removes databaseBackupPath Controller options (no longer used).
Removes supportsBackup Adapter function in favor of a plain variable (defaults to true, adapters without can override, same as hasZdoMessageOverhead).

TODO:

  • test coverage
  • update Z2M to match new API

@Nerivec
Copy link
Collaborator Author

Nerivec commented Nov 12, 2025

How do we handle rotating this stuff? I figure we don't want to be keeping 100 folders 😅
Should we use a subfolder as default (like Z2M logs)? Static const, use a Z2M config for rotation params? Should it run on start? Have to keep in mind that a bad shutdown could end up doing a few retries (watchdog), each could end up "backing up" bad files, we want to avoid overwriting the last "good one"... as much as possible.

Sidenote: not sure how old coordinator backups will behave in all stacks with frame counters & such.

@Koenkk
Copy link
Owner

Koenkk commented Nov 14, 2025

Maybe do it time based? e.g. keep for a week

@Nerivec Nerivec marked this pull request as draft November 24, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants