[ Didn't realise that `groups` defaults to top-posting - Oh well... ] Thanks for the advice Tom
`integrity_check` reports 100 lines of scary stuff with `row out of order`, `multiple uses of byte` and `row missing from index` the dump file exports a 14MB database to a tad under 30MB in 65K rows - which seems a bit small (?) The `archive` table dump ends like this (I have truncated the row data): INSERT INTO "archive" VALUES(1559748300,17,5,1.0067543065450712536e+03,1003.2,1.00648074943336762743e+03, INSERT INTO "archive" VALUES(199647744053,NULL,NULL,NULL,NULL,NULL,NULL,NULL, /**** ERROR: (11) database disk image is malformed *****/ CREATE TABLE archive_day_barometer (dateTime INTEGER NOT NULL UNIQUE PRIMARY KEY, min REAL, mintime INTEGER, max REAL, maxtime INTEGER, sum REAL, count INTEGER, wsum REAL, sumtime INTEGER); /**** ERROR: (11) database disk image is malformed *****/ INSERT INTO "archive_day_barometer" VALUES(1572480000,1.0192 INSERT INTO "archive_day_barometer" VALUES(1572393600,1.021 INSERT INTO "archive_day_barometer" VALUES(1572307200,1.022 the date of the final valid INSERT is 5th June (system started 1st March). The dateTime of the last archive row is obviously corrupt but taking off the excess chars takes it forward to 2033!! The two `ERROR` flags are the only ones in the dump - I cannot relate the 2nd `ERROR` though the _baro_ table appears to be in descending order while all others are ascending.... ***** In short: Is it worth persevering with this DB given it (essentially) truncates 5 months ago? ***** Grateful for any further comments. -D On Thursday, 31 October 2019 13:41:04 UTC, Thomas Keffer wrote: > > 1. Depends on how you're doing the uploading. If using FTP, then WeeWX > checks to see if there is a newer version available. If so, it uploads. If > rsync, it synchronizes the two directories so they have the same content. > Either way, this is a tenuous way to maintain your NOAA reports. You're > better off fixing the database, if possible. There's no substitute for > good, primary data. > > 2. I know the RPi has a reputation for corrupting SD cards, but I haven't > seen any hard data to that effect. In fact, just the opposite: I've been > running > an experiment <http://www.threefools.org/weewx/status/index.html> on how > long a card can survive in the WeeWX environment. It has now gone for > nearly 5 years without a problem. If you have a good card on a good UPS, > you can go for years without a problem. Just do sensible backups, and swap > out the card every once in a while. Or, use a USB mounted SSD or hard > drive. > > In any case, running a database over a NFS mount is unlikely to work very > well. The problem is that many NFS implementations have subtle problems > with their locking mechanisms. See the SQLite FAQ > <https://www.sqlite.org/faq.html#q5>. > > -tk > > On Thu, Oct 31, 2019 at 6:09 AM Dave, G1OGY <[email protected] > <javascript:>> wrote: > >> I have suffered database corruption (on a RPi - Yes...) >> I am by no means a `climate researcher` - I just like to know what the >> weather >> is doing/has been doing... >> >> So. Two questions: >> >> 1) Given I upload all data to my website (where this morning's web pages >> remain >> - with all data accessible) will the NOAA files be overwritten if I were >> to: >> a) reinstall the Pi with `buster` >> b) install the new version of weewx >> c) copy the NOAA .txt files to the appropriate place... >> and carry on? >> >> 2) I have my weewx logs on a nfs mount (to reduce SD card writes, >> primarily; though >> I log only errors). >> Given the history of broad RPi database corruption; has anyone has >> success with >> hosting the database (or even the whole weewx installation) on an nfs >> mount? >> >> This is a Pi3 with Gigabit (OK : =< 150Mb/sec) Ethernet connectivity. >> >> TIA for any feedback. >> >> -D >> >> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/a74e3bc2-7346-445f-b0f5-eee9e7ecdc2d%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/a74e3bc2-7346-445f-b0f5-eee9e7ecdc2d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/b9c14b5a-4176-4b1f-9c9e-8d4b8dfbae23%40googlegroups.com.
