wee_database --backup
leveraging the data bindings in weewx.conf sounds like a beneficial
core utility service that would then be called from a script/cron.
On Sunday, January 10, 2021 at 10:22:43 AM UTC-5 [email protected] wrote:
> If the backup takes long enough, it could interfere with writing a record
> to the database. Eventually, the write will time out, causing weewxd to
> restart from the top. It won't crash weewxd (that is, cause it to exit),
> nor corrupt the database, but the record would be lost.
>
> That's the advantage of the incremental backup approach. The backup
> process never holds a lock on the database for very long. Just a second or
> two.
>
> BTW, the backup API
> <https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.backup> is
> now included in Python starting with V3.7. If you have a modern version of
> Python, you don't have to write a C program to access the API.
>
> I'm hoping to inspire someone to write a simple script that would run once
> a day using the backup API.
>
> -tk
>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/f12fd696-9b4d-4ae0-9f28-900c8d858db4n%40googlegroups.com.