Skip to content

Conversation

@starwarsfan
Copy link

If package is upgraded, backup the current database to

`/var/backups/evcc/` 

by following the naming schema

`evcc.db.<evcc-version>.<timestamp>.bak`

So one would have automatically a db backup with every upgrade. Please let me know where to put this into the documentation!

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@starwarsfan starwarsfan mentioned this pull request Nov 6, 2025
2 tasks
@mucki12
Copy link
Contributor

mucki12 commented Nov 6, 2025

Bin kein Code Experte und kann die Aufbewahrungsfrist bzw. das Vorhalten wie vieler Backup Versionen nicht erkennen.

Wird ja wenn dann hoffentlich nur optional sein - ich benötige das aufgrund vorhandener Backups zumindest nicht.

@starwarsfan
Copy link
Author

Wird ja wenn dann hoffentlich nur optional sein - ich benötige das aufgrund vorhandener Backups zumindest nicht.

Guter Punkt, danke!

Optional ist das nicht, da man darauf bei der Paketinstallation nicht wirklich Einfluss hat. Was schlägst Du vor, wieviele Versionen liegen bleiben sollten? Da man ja insbesondere im Problemfall durchaus etwas "herumspringen" kann, würde ich acht oder zehn Versionen liegen lassen. Meinungen?

@mucki12
Copy link
Contributor

mucki12 commented Nov 6, 2025

Nun ja, da müssen andere Meinungen kommen.
Meine Meinung nach exakt 0 - da ich ja selbstverständlich Backups habe.

@StefanSchoof
Copy link
Contributor

Mein /var/backups hat ein Recht einheitlich 7 Dateien (einmal 0 und 1 bis zu 6 .gz).

Das sieht so einheitlich aus, da Frage ich mich ob es ein tool oder Befehl in den Debian packaging tool chain gibt die sich darum kümmert.

@starwarsfan
Copy link
Author

Das sieht so einheitlich aus, da Frage ich mich ob es ein tool oder Befehl in den Debian packaging tool chain gibt die sich darum kümmert.

Das macht vermutlich logrotate. Ich werde mir mal die Konfig dazu anschauen, dann kann man das ganz elegant mit Bordmitteln lösen.

@starwarsfan starwarsfan marked this pull request as draft November 6, 2025 21:35
@naltatis
Copy link
Member

naltatis commented Nov 7, 2025

FYI: The avg. db size will grow with upcoming versions when we start to introduce metrics (#23185). So I wouldn't recommend to keep many versions around. Especially on size-constrained devices.

@RenatusRo
Copy link
Contributor

@starwarsfan FYI:
yourip:7070/#/issue
und dann auf 'Configuration UI Show details' clicken gibt einen schoenen json dump der settings.
mit #23771 war ich aber abgeblitzt - vllt. wird das jetzt wieder interessant :-)

@github-actions github-actions bot added the stale Outdated and ready to close label Nov 14, 2025
@mucki12
Copy link
Contributor

mucki12 commented Nov 15, 2025

Landen die Backups dann bei einer Home Assistant Installation in /addon_configs/49686a9f_evcc?

@github-actions github-actions bot removed the stale Outdated and ready to close label Nov 15, 2025
@starwarsfan
Copy link
Author

Landen die Backups dann bei einer Home Assistant Installation in /addon_configs/49686a9f_evcc?

Mit HA hat das nichts zu tun. Hier geht es um das (Debian-)Paket, welches via Paketmanager installiert wird.

@starwarsfan
Copy link
Author

FYI: The avg. db size will grow with upcoming versions when we start to introduce metrics (#23185). So I wouldn't recommend to keep many versions around. Especially on size-constrained devices.

Understand. I'm thinking about some kind of configuration option to define the amount of backups to keep. But I have no idea at the moment, how to get that configured value during package removal. Any ideas?

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.

5 participants