Günther,

I get "database disk image is malformed" on both my Ubuntu system, and on a
Raspberry Pi.

-tk

On Sat, Feb 22, 2020 at 11:14 AM Günther Wrana <[email protected]> wrote:

> https://drive.google.com/open?id=1q_ILd6m6M_KT0HThnv6X7JHxbaq8zMfA
>
> If i open this merged database on Ubuntu with SQLite there is no problem.
> But when i send this datatbase on the raspberry where weewx is runing
> weewx is out of order.
> Where is the problem?
>
> I know that the database on the raspberry is named weewx.sdb
>
> I hope anybody can help me and understand my terrible english.
>
> Thanks
>
> Am Sonntag, 16. Februar 2020 09:42:29 UTC+1 schrieb Günther Wrana:
>>
>> Das wird gemeldet wenn ich die alte Datenbank mit den oben angeführten
>> Befehlen abfrage.
>> Ist da noch etwas zu machen oder ist die alte Datenbank defekt und ich
>> kann sie löschen.
>>
>> Grüße Günther
>>
>>
>> daham@hp-pc:/tmp$ sudo sqlite3 /tmp/db1.sdb
>> SQLite version 3.22.0 2018-01-22 18:45:57
>> Enter ".help" for usage hints.
>> sqlite> SELECT MIN(dateTime),MAX(dateTime),COUNT(dateTime) FROM archive;
>> Error: database disk image is malformed
>> sqlite> SELECT strftime('%d-%m-%Y %H:%M:%S', datetime(MIN(dateTime),
>> 'unixepoch', 'localtime')),strftime('%d-%m-%Y %H:%M:%S',
>> datetime(MAX(dateTime), 'unixepoch', 'localtime')),COUNT(dateTime) FROM
>> archive;
>> Error: database disk image is malformed
>> sqlite>
>>
>>
>> Am Montag, 6. Januar 2020 22:43:02 UTC+1 schrieb gjr80:
>>>
>>> Hallo
>>>
>>> Die angezeigten Fehlermeldungen werden erwartet und können ignoriert
>>> werden.
>>>
>>> Die Dateigröße kann manchmal ein nützlicher Maßstab sein, liefert jedoch
>>> nicht immer ein genaues Bild. Der wahre Test besteht darin, die Daten in
>>> der neuen zusammengeführten Datenbank zu überprüfen oder zu verwenden.
>>> Haben Sie die letzten Schritte befolgt und WeeWX tatsächlich dazu gebracht,
>>> die neue zusammengeführte Datenbank zu verwenden? Wenn ja, was zeigen die
>>> Berichte jetzt?
>>>
>>> Sie können auch die neue Datenbank abfragen und die frühesten und
>>> neuesten Zeitstempel finden. Wenn Ihre Datenbank
>>> /home/weewx/archive/weewx.sdb lautet, kann die folgende Befehlsfolge
>>> verwendet werden:
>>>
>>> $ sqlite3 /home/weewx/archive/weewx.sdb
>>> sqlite> SELECT MIN(dateTime),MAX(dateTime),COUNT(dateTime) FROM archive;
>>>
>>> Dies zeigt die frühesten und neuesten Zeitstempel, gefolgt von der
>>> Anzahl der Archivdatensätze.
>>>
>>> 1486989000|1578345600|300759
>>>
>>> oder um die Zeitstempel in lesbarer Form anzuzeigen:
>>>
>>> sqlite> SELECT strftime('%d-%m-%Y %H:%M:%S', datetime(MIN(dateTime),
>>> 'unixepoch', 'localtime')),strftime('%d-%m-%Y %H:%M:%S', datetime(MAX(
>>> dateTime), 'unixepoch', 'localtime')),COUNT(dateTime) FROM archive;
>>>
>>> was so etwas zeigen wird:
>>>
>>> 13-02-2017 22:30:00|07-01-2020 07:25:00|300760
>>>
>>> Sie können die obigen Überprüfungen auch für die beiden Datenbanken vor
>>> dem Zusammenführen durchführen. Wenn der früheste und der späteste
>>> Zeitstempel und Datensatz übereinstimmen, haben Sie ein gewisses Maß an
>>> Sicherheit, dass die Zusammenführung wie erwartet erfolgt ist. Eine
>>> umfassendere Überprüfung besteht darin, dass WeeWX die zusammengeführte
>>> Datenbank verwendet und anschließend neu generierte NOAA-Berichte
>>> überprüft. Dies sollte auf einen Blick zeigen, ob die Zusammenführung
>>> funktioniert hat.
>>>
>>> Gary
>>>
>>> The error messages you see are expected, they can be ignored.
>>>
>>> File size can sometimes be a useful yardstick but does not always give
>>> an accurate picture. The true test is to check or use the data in the new
>>> merged database. Did you follow the last few steps and actually get WeeWX
>>> to use the new merged database? If so what do the reports show now?
>>>
>>> Another check you can do is to query the new database and find the
>>> earliest and latest timestamps. If your database is
>>> /home/weewx/archive/weewx.sdb the following sequence of commands can be
>>> used:
>>>
>>> $ sqlite3 /home/weewx/archive/weewx.sdb
>>> sqlite> SELECT MIN(dateTime),MAX(dateTime),COUNT(dateTime) FROM archive;
>>>
>>> this will show the earliest and latest timestamps followed by the
>>> archive record count, something like:
>>>
>>> 1486989000|1578345600|300759
>>>
>>> or to view the timstamps in human readable form:
>>>
>>> sqlite> SELECT strftime('%d-%m-%Y %H:%M:%S', datetime(MIN(dateTime),
>>> 'unixepoch', 'localtime')),strftime('%d-%m-%Y %H:%M:%S', datetime(MAX(
>>> dateTime), 'unixepoch', 'localtime')),COUNT(dateTime) FROM archive;
>>>
>>> which will show something like:
>>>
>>> 13-02-2017 22:30:00|07-01-2020 07:25:00|300760
>>>
>>> You can also perform the above checks on the two databases before the
>>> merge, if the earliest and latest timestamps and record counts tally then
>>> you have a degree of confidence that the merge occurred as expected. A more
>>> complete check is having WeeWX use the merged database and then checking
>>> re-generated NOAA reports. This should show at a glance if the merge worked.
>>>
>>> On Tuesday, 7 January 2020 05:56:41 UTC+10, Günther Wrana wrote:
>>>>
>>>>
>>>> Hallo wenn ich folgende Befehle im Terminal eingebe wie oben
>>>> beschrieben.
>>>> Bekomme ich folgende Fehlermeldungen.
>>>>
>>>> Es wir irgend etwas in der Datenbank durchgeführt nur wird sie dadurch
>>>> nicht grösser.
>>>> Wo liegt das Problem, oder was mache ich falsch?
>>>>
>>>>
>>>>
>>>> daham@daham-p7-1011de:~$ sqlite3 /var/tmp/db1.sdb
>>>> SQLite version 3.22.0 2018-01-22 18:45:57
>>>> Enter ".help" for usage hints.
>>>> sqlite> .output/var/tmp/db1.dump
>>>> daham@daham-p7-1011de:~$ sqlite3 /media/daham/Neu1601/Eigene\
>>>> Dateien/Wetterstation/weewx/271220192133/weewx.sdb
>>>> SQLite version 3.22.0 2018-01-22 18:45:57
>>>> Enter ".help" for usage hints.
>>>> sqlite> .read /var/tmp/db1.dump
>>>> Error: near line 3: table archive already exists
>>>> Error: near line 40840: table archive_day_barometer already exists
>>>> Error: near line 40984: table archive_day_pressure already exists
>>>> Error: near line 41128: table archive_day_altimeter already exists
>>>> Error: near line 41256: table archive_day_inTemp already exists
>>>> Error: near line 41400: table archive_day_outTemp already exists
>>>> Error: near line 41544: table archive_day_inHumidity already exists
>>>> Error: near line 41688: table archive_day_outHumidity already exists
>>>> Error: near line 41832: table archive_day_windSpeed already exists
>>>> Error: near line 41976: table archive_day_windDir already exists
>>>> Error: near line 42120: table archive_day_windGust already exists
>>>> Error: near line 42264: table archive_day_windGustDir already exists
>>>> Error: near line 42408: table archive_day_rainRate already exists
>>>> Error: near line 42552: table archive_day_rain already exists
>>>> Error: near line 42696: table archive_day_dewpoint already exists
>>>> Error: near line 42840: table archive_day_windchill already exists
>>>> Error: near line 42984: table archive_day_heatindex already exists
>>>> Error: near line 43128: table archive_day_ET already exists
>>>> Error: near line 43272: table archive_day_radiation already exists
>>>> Error: near line 43416: table archive_day_UV already exists
>>>> Error: near line 43560: table archive_day_extraTemp1 already exists
>>>> Error: near line 43704: table archive_day_extraTemp2 already exists
>>>> Error: near line 43848: table archive_day_extraTemp3 already exists
>>>> Error: near line 43992: table archive_day_soilTemp1 already exists
>>>> Error: near line 44136: table archive_day_soilTemp2 already exists
>>>> Error: near line 44280: table archive_day_soilTemp3 already exists
>>>> Error: near line 44424: table archive_day_soilTemp4 already exists
>>>> Error: near line 44568: table archive_day_leafTemp1 already exists
>>>> Error: near line 44712: table archive_day_leafTemp2 already exists
>>>> Error: near line 44856: table archive_day_extraHumid1 already exists
>>>> Error: near line 45000: table archive_day_extraHumid2 already exists
>>>> Error: near line 45144: table archive_day_soilMoist1 already exists
>>>> Error: near line 45288: table archive_day_soilMoist2 already exists
>>>> Error: near line 45432: table archive_day_soilMoist3 already exists
>>>> Error: near line 45576: table archive_day_soilMoist4 already exists
>>>> Error: near line 45720: table archive_day_leafWet1 already exists
>>>> Error: near line 45864: table archive_day_leafWet2 already exists
>>>> Error: near line 46008: table archive_day_rxCheckPercent already exists
>>>> Error: near line 46152: table archive_day_txBatteryStatus already exists
>>>> Error: near line 46296: table archive_day_consBatteryVoltage already
>>>> exists
>>>> Error: near line 46440: table archive_day_hail already exists
>>>> Error: near line 46584: table archive_day_hailRate already exists
>>>> Error: near line 46728: table archive_day_heatingTemp already exists
>>>> Error: near line 46872: table archive_day_heatingVoltage already exists
>>>> Error: near line 47016: table archive_day_supplyVoltage already exists
>>>> Error: near line 47160: table archive_day_referenceVoltage already
>>>> exists
>>>> Error: near line 47304: table archive_day_windBatteryStatus already
>>>> exists
>>>> Error: near line 47448: table archive_day_rainBatteryStatus already
>>>> exists
>>>> Error: near line 47592: table archive_day_outTempBatteryStatus already
>>>> exists
>>>> Error: near line 47736: table archive_day_inTempBatteryStatus already
>>>> exists
>>>> Error: near line 47880: table archive_day__metadata already exists
>>>> Error: near line 47881: UNIQUE constraint failed:
>>>> archive_day__metadata.name
>>>> Error: near line 47882: UNIQUE constraint failed:
>>>> archive_day__metadata.name
>>>> Error: near line 47883: table archive_day_wind already exists
>>>> sqlite>
>>>>
>>>> --
> 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/87c9cfc6-2b06-4924-8479-c996405e1d74%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/87c9cfc6-2b06-4924-8479-c996405e1d74%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/CAPq0zEAu_rCipO84oyoVkLeaMV3opjWFZuEvP%2BTMgaxhNb606Q%40mail.gmail.com.

Reply via email to