Scheduled backup
Is your feature request related to a problem? Please describe. The introduction of metrics collection and history UI there is more and more data kept in the database which would be really sad to lose. I have to assume that introduction of metrics collection also increases the wear of SDCards - altho the recommendation are eMMC, that's understood - but perhaps not always the case. Today, Backup needs to be run manually, there is no automatic, scheduled backup of evcc config + data.
Describe the solution you'd like Introduction of a scheduled backup (i.e. daily/weekly). Conceptually I could see two components to thiss:
- there's the scheduler to run regular backups which emits a backup file
- and there's be storage modules which then accept the backup file and store them on a configured storage provider. I.e. a USB flashdrive, network share, OneDrive, other cloud services. Handling of those would be in the respective storage provider modules.
Describe alternatives you've considered Manual backup, but I keep forgetting this. Not sure if there's a way to create & download backups via API, but this would require users to setup automation outside evcc. Not a great option.
Additional context Happy to work on a OneDrive storage module, there are libraries available, did something similar for openWB back in the days already.
Fairly new to this awesome piece of software. From the first start a few days ago, my understanding was that everything is in the DB, which is now the default way to configure everything from the web UI. I stand to be corrected here.
I quickly drafted an "sqlite .backup ..." cron job to have a clean copy in a place where it will be picked up by my regular backups anyway.
Having used that backup file to restart from a new docker container and finding everything that I expected tells me that I'm not completely off, here.
This is the way: my backup runs every night with a simple cronjob.
Pull Request with similar topic #25118
Weβre not gonna build any schedules. All this is possible by using the apis.
I created this to show what a solution can look like:
https://github.com/hermannthomas77/evcc/tree/feature/auto-backup
I will also quote the website:
"We π good UI We want to make smart energy management easy for everyone. Ideally, everything works without manual intervention or regular adjustments. But if you do want to see what the system is doing, we have a clean and responsive web interface ready to go."
The last reason why this should be done in the UI is that you already have a backup feature. Why stop there? Following your argument, you would have to remove that too, because everything can be done via the API.