tillsteinbach / VWsFriend

VW WeConnect visualization and control
MIT License
251 stars 21 forks source link

configurable regular database backup #264

Open upelectric opened 2 years ago

upelectric commented 2 years ago

I have a suggestion for a new feature. It would be nice if I could configure a regular backup of the database to a backup volume. Currently I have to backup the database manually with the UI.

tillsteinbach commented 2 years ago

I like the idea and it is probably pretty easy to implement. What would you think is necessary to configure. The storage location, interval and the number of backups to keep?

tillsteinbach commented 2 years ago

In the meantime you can also backup the database with somethign like this:

docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql

in a cronjob

upelectric commented 2 years ago

Yeah, I think storage location, interval and number of backups to keep should be enough. In the meantime I will use the docker command.

motorto commented 3 weeks ago

@tillsteinbach if I run that command in a cronjob how can I then restore the database in a new install ?