Run wee_database --help and check out the --from and --to and --date 
options.  They let you rebuild things for only a specified date or range of 
dates.  That should sped things up a lot.

       wee_database --rebuild-daily [--date=YYYY-mm-dd |
                                    [--from=YYYY-mm-dd] [--to=YYYY-mm-dd]]
                                    [--dry-run]
On Tuesday, January 11, 2022 at 6:01:04 PM UTC-8 [email protected] wrote:

> Sometimes when we get a power failure, by WeeWx system recovers but the 
> HP1000 console doesn't. This means that the WeeWx app carries on trying to 
> access the console and also producing other reports, summary items etc., 
> especially if the console is not recovered until after midnight. (At least 
> this is how I interpret the situation.)
> What this means is that there is a gap in the data in the data base: when 
> access to the console is restored, WeeWx thinks that it records have been 
> added even when they have not.
> The solution is to delete all records after the last valid one before the 
> power failure occurred but this also requires that all daily summary 
> records be deleted (a la the various instructors such as at 
> https://groups.google.com/g/weewx-user/c/ZXjuqhLz0UY). In y case I have 4 
> years worth of data in the database and therefore the '--rebuild-daily' 
> takes forever.
> Is there a faster way so that I can:
> - delete the latest records after the gap
> - do some magic step here that resets a date to say when the last valid 
> record was 
> - have WeeWx recover from there
> (By the way, my HP1000 driver looks at the last entry in the database for 
> the date from which to recover, even if the last record is 'junk' - while 
> this may the the root cause of my problem, I don't know of a better way.)
> Susan
>

-- 
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/c3b0c4ac-af96-4a8b-a87d-8657450fbed4n%40googlegroups.com.

Reply via email to