You did not say how you did the install, but I'll assume you used the
package installer with apt. This means your database is located at
/var/lib/weewx/weewx.sdb. Adjust as necessary.

On the machine that has the one day of data, dump the database into a text
file:

*sqlite3 /var/lib/weewx/weewx.sdb*
sqlite>* .output /var/tmp/weewx.sql*
sqlite>* .dump*
sqlite>* .quit*

Copy the file /var/tmp/weewx.sql to the new machine somehow, perhaps on a
USB stick. I'll assume you put it in /var/tmp/weewx.sql on the new machine.

On the new machine:

# Make a backup:
*sudo cp /var/lib/weewx/weewx.sdb /var/lib/weewx/weewx.sdb.backup*
# Merge:
*sudo sqlite3 /var/lib/weewx/weewx.sdb < /var/tmp/weewx.sql*

You will get many errors, including that the "table archive already
exists", and "UNIQUE constraint failed". You can ignore these.

-tk


On Fri, Oct 4, 2024 at 11:42 AM Dirk Uhlich <[email protected]>
wrote:

> Hi,
>
> i've searched some time, but no luck or wrong search method.
> At my weather station Vantage Pro2 with Raspberry the USB-Stick died or is
> dying. It stoped working but I was able to save some data.
>
> I managed to install everything on a new USB but now data of one day is
> missing.
> Running second pi with weatherstick has this data but here's my problem:
>
> How do I manage to copy one day of Data (Timestamp 1728000600 to
> something like 1728069000) from one weex.sdb to my new one with missing
> data.
> I know stopping weewx is mandatory, but I've no experience with sqlite.
>
> Important to know:actual weewx.sdb contains data sind 2021 until yesterday
> ...
>
> Maybe anybody could help.
>
> Thanks a lot
> Dirk
>
> --
> 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/307fed91-f842-4a79-99d2-7de6f34f5336n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/307fed91-f842-4a79-99d2-7de6f34f5336n%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/CAPq0zEC-pKLD5r7goJ0z%3DNqDyJ4BHQz0B9cp-Km_nE6tk5bgVw%40mail.gmail.com.

Reply via email to