Recovering Data from a broken RPI installation

62 views
Skip to first unread message

Paul Lacatus (Gmail)

unread,
Aug 11, 2019, 2:36:22 PM8/11/19
to weewx...@googlegroups.com
Hi,

My long running installation of weewx on a RPI 3b+ with WMR300 is
broken. Does not boot anymore. I am able to see the rpi partition
mounted from SD card on my macBook  . I am thinking of reinstalling from
scratch with the new raspbian that is running also on RPI4 but I want to
recover my two years data base . Some hints please? What should I
recover from old SD ?  I just saved /etc/weewx .


Paul


Greg Troxel

unread,
Aug 11, 2019, 2:49:09 PM8/11/19
to Paul Lacatus (Gmail), weewx...@googlegroups.com
If you used sqlite, look for archive/weewx.sdb in your weewx install
path.

On my system, that's /usr/weewx/archive/weewx.sdb from a manual install.

If you used a package, you need to figure out where it put it.

For the next round, figure out how to save a copy of weewx.sdb at least
weekly.





Paul Lacatus (Gmail)

unread,
Aug 11, 2019, 2:53:57 PM8/11/19
to Greg Troxel, weewx...@googlegroups.com
After recovering the procedure is to reinstall Weewx and after to copy
the saved database over the new one ?
Any known issues with weewx on rasbian buster ?
Message has been deleted

p q

unread,
Aug 11, 2019, 3:02:41 PM8/11/19
to weewx...@googlegroups.com, Greg Troxel
You might want to copy the skin conf if you've done any customization. You'll want /etc/weewx/weewx.conf and /etc/weewx/skins/* and your database probably in /var/lib/weewx

I'm running Stretch on my station but I've run Buster in a VM for testing with no problems.

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/90ce9882-3526-dfc9-1933-57dea0f5c13b%40gmail.com.


--
Peter Quinn
(415)794-2264

Greg Troxel

unread,
Aug 11, 2019, 3:11:03 PM8/11/19
to Paul Lacatus (Gmail), weewx...@googlegroups.com
"Paul Lacatus (Gmail)" <paul.l...@gmail.com> writes:

> After recovering the procedure is to reinstall Weewx and after to copy
> the saved database over the new one ?

Right now, your data logger, if your station has one, probably has data
for the downtime. So what I'd do is:

disconnect the cable to the logger

reinstall weewx

recover the config (and customized skins as someone else suggested)

copy in the database (and save a copy of the old database multiple
other places!)

start up weewx and make sure you can generate plots etc. The point is
not that you can't fix that later but it proves that the old data from
the db is accessible

shut down weewx, reconnect the wx station cable, and start up

If your station doesn't log, then the disconnect/test/reconnect step is
not in order, and as long as the database is ok you can fix
skin/generation/upload at your leisure.

Note that I have not done what I am telling you to do; it's based on
understanding not experience.

Paul Lacatus (Gmail)

unread,
Aug 12, 2019, 6:41:18 AM8/12/19
to Greg Troxel, weewx...@googlegroups.com
Hi Greg,

Thank you for the suggestions.  I just install again weewx with general
configs and selecting WMR300 driver .  As suggested did not connected
the USB cable to not download the measurements from the station .  The
issue is that :

 wmr300: history limit is 20% at index 6572
Aug 12 13:35:08 meteopi weewx[686]: engine: Import of driver failed:
Unable to find station on USB: cannot find device with VendorID=0x0fde
ProductID=0xca08 (<class 'weewx.drivers.wmr300.WMR300Error'>)
Aug 12 13:35:08 meteopi weewx[686]: engine: Unable to load driver:
Unable to find station on USB: cannot find device with VendorID=0x0fde
ProductID=0xca08
Aug 12 13:35:08 meteopi weewx[686]:     ****  Exiting...

and Weewx does not generate a clean database nor the html files in order
to put the old database

Any ideeas ?

Andrew Milner

unread,
Aug 12, 2019, 6:54:56 AM8/12/19
to weewx-user
1. html files will only be created at the end of the first archive interval - so that is not a problem
2. the database is probably only created when the first data is received - but you can still copy your back up .sdb database file into the correct directory - and it will then be used by weewx.  
If you are 'not sure' where the .sdb should be put just change your device to simulator and let weewx create a database for you.  After that you can stop weewx, delete the newly created database, copy your backup database to the correct directory, change your device back to the correct station type and restart weewx.



On Monday, 12 August 2019 13:41:18 UTC+3, Paul Lacatus (Gmail) wrote:
Hi Greg,

Thank you for the suggestions.  I just install again weewx with general
configs and selecting WMR300 driver .  As suggested did not connected
the USB cable to not download the measurements from the station .  The
issue is that :

  wmr300: history limit is 20% at index 6572
Aug 12 13:35:08 meteopi weewx[686]: engine: Import of driver failed:
Unable to find station on USB: cannot find device with VendorID=0x0fde
ProductID=0xca08 (<class 'weewx.drivers.wmr300.WMR300Error'>)
Aug 12 13:35:08 meteopi weewx[686]: engine: Unable to load driver:
Unable to find station on USB: cannot find device with VendorID=0x0fde
ProductID=0xca08
Aug 12 13:35:08 meteopi weewx[686]:     ****  Exiting...

and Weewx does not generate a clean database nor the html files in order
to put the old database

Any ideeas ?




On 11-Aug-19 22:10, Greg Troxel wrote:

Michi Kaa

unread,
Aug 12, 2019, 7:21:04 AM8/12/19
to weewx-user
If you just want to know, if it still works, copy your db and configure "simulator" driver and see what happens.

Andrew Milner

unread,
Aug 12, 2019, 7:36:22 AM8/12/19
to weewx-user
If you do run the simulator driver remember to delete the database which simulator has used - because weewx will have added simulator data to the database -  copy your old database back again, change back to wmr device, reconnect wmr, and weewx should do the catchup from the last db record to the present time.  Just go in small steps and keep calm!!

Paul Lacatus (Gmail)

unread,
Aug 12, 2019, 8:27:39 AM8/12/19
to weewx...@googlegroups.com
I just used simulator so weewx can generate data base . After that put old database over the one generated and put old weewx.conf .  Looks like working well even data for the period when failed to new restart looks like missing .


problems are now with the Belchertown skin  where now I am running 1.0.1 with the settings from 1.0 and looks like something is not right:

--
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 weewx-user+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages