I usually use rsync.

On Tue, Jul 4, 2023 at 2:57 PM Yves Martin <[email protected]> wrote:

> Here are some information:
>
> sqlite> .show
>         echo: off
>          eqp: off
>      explain: auto
>      headers: off
>         mode: list
>    nullvalue: ""
>       output: stdout
> colseparator: "|"
> rowseparator: "\n"
>        stats: off
>        width:
>     filename: /var/lib/weewx/weewx.sdb
> sqlite> .dbinfo ?DB?
> unable to read database header
> sqlite> .dbinfo /var/lib/weewx/weewx.sdb
> unable to read database header
> sqlite> .dbinfo weewx.sdb
> unable to read database header
>
> (...)
>
> What is the best way to copy this database from one raspberry Pi to
> another one?
>
> YM
>
> Le mardi 4 juillet 2023 à 17 h 18 min 46 s UTC-4, p q a écrit :
>
>> The error says the disk image is malformed. Can you open the database
>> file with another tool, such as DB Browser or SQLite itself?
>>
>> If it's true and the database is messed up, then you may need to get a
>> back up if you have one.
>>
>> On Tue, Jul 4, 2023 at 2:04 PM Yves Martin <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I've upgraded the Debian distribution (from version 7 to 10) and Python
>>> 2.7 to 3.8.
>>>
>>> I've copied the sqlite database in /var/lib/weewx/ to the new
>>> distribution.
>>>
>>> Unfortunately, when I start weewx, I have this error :
>>>
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****    File "/usr/share/weewx/weewx/manager.py", line 130, in __init__
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****      self.sqlkeys = self.connection.columnsOf(self.table_name)
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****    File "/usr/share/weewx/weedb/sqlite.py", line 187, in columnsOf
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****      column_list = [row[1] for row in self.genSchemaOf(table)]
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****    File "/usr/share/weewx/weedb/sqlite.py", line 187, in <listcomp>
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****      column_list = [row[1] for row in self.genSchemaOf(table)]
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****    File "/usr/share/weewx/weedb/sqlite.py", line 176, in
>>> genSchemaOf
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****      for row in self.connection.execute("""PRAGMA
>>> table_info(%s);""" % table):
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****  sqlite3.DatabaseError: database disk image is malformed
>>> Jul 04 15:17:09 weewx4-raspi python3[377]: weewx[377] CRITICAL __main__:
>>>     ****  Exiting.
>>>
>>> I cannot find here this kind of error.
>>> Any help or suggestion will be appreciated.
>>>
>>> Regards,
>>> Yves
>>> YMartin.com/meteo
>>>
>>> --
>>> 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/61339c2c-7deb-4c69-88c8-f2e3a0edcfd2n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/61339c2c-7deb-4c69-88c8-f2e3a0edcfd2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Peter Quinn
>> (415)794-2264 <(415)%20794-2264>
>>
> --
> 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/d556a0b8-1387-40f8-b13e-6dddb74c079fn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/d556a0b8-1387-40f8-b13e-6dddb74c079fn%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/CAPq0zEBv5Jxo2fm7Cg8GCFym7o7XaDmz2b7EcYN_zrgXv4FR4Q%40mail.gmail.com.

Reply via email to