The weewx database is only written to once for each archive period (typically 5 minutes).  There is no need to stop weewx to back it up.  Simply take a sha1sum of weewx.sdb before you copy it and then take a sha1sum of the copy.  If the sha1s differ, the database changed and you’ll need to sleep and try again.

You can make sure you never get unlucky with the backup by being thoughtful when you run the backup.  For example, if your archive period is 5 minutes, don’t run the backup on a 5 minute boundary.  For example, run it at 2 minutes pat the hour.

On Feb 17, 2025, at 9:34 AM, Keimpe Bleeker <bleek...@gmail.com> wrote:

Hi all, once a week a script, executed by CRON, is making a backup of the essentials like config files and the weewx.sdb, once a month an image of the SD-card. Prior to these backups I'm stopping Weewx, in my point of view to protect the database. The 'small backup' takes some minutes, the image about half an hour.  I'm curious if it is necesarry to shut down Weewx. Anobody a suggestion?    

--
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/c84a0352-0b36-4e93-a78b-5fee18989600n%40googlegroups.com.

--
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/58C7E582-A85B-409C-A457-A0757EEDEC1F%40johnkline.com.

Reply via email to