Raspberry Pi crashed so I had to reinstall WeeWx

62 views
Skip to first unread message

Michael Sanphillipo

unread,
May 2, 2020, 7:55:42 PM5/2/20
to weewx-user
My Pi SD card was corrupted and I had to reload Debian along with WeeWx. I lost a years' worth of data. Is there a way to recover the files and where should I look on my old SD card?

Tom Keffer

unread,
May 2, 2020, 8:16:16 PM5/2/20
to weewx-user
That sounds like a systems ops question. Try googling for "recovering lost files from sd card" or something like that.

As a last resort, if you posted to the Weather Underground, you can use wee_import to import the data back in.

Next time, make sure you do back ups!



On Sat, May 2, 2020 at 4:55 PM Michael Sanphillipo <sanph...@gmail.com> wrote:
My Pi SD card was corrupted and I had to reload Debian along with WeeWx. I lost a years' worth of data. Is there a way to recover the files and where should I look on my old SD card?

--
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/0dff1031-8470-4110-ba4b-e22e9343f986%40googlegroups.com.

gjr80

unread,
May 2, 2020, 8:32:39 PM5/2/20
to weewx-user
Hi,

If you do manage to access your old SD card and if you were using SQLite (the default) to store your data, the file you are after is weewx.sdb (again assuming you used the default) which is in /home/weewx/archive or /var/lib/weewx depending on how you installed WeeWX. Refer to Where to find things in the User's Guide.

Gary

On Sunday, 3 May 2020 10:16:16 UTC+10, Tom Keffer wrote:
That sounds like a systems ops question. Try googling for "recovering lost files from sd card" or something like that.

As a last resort, if you posted to the Weather Underground, you can use wee_import to import the data back in.

Next time, make sure you do back ups!



On Sat, May 2, 2020 at 4:55 PM Michael Sanphillipo <sanph...@gmail.com> wrote:
My Pi SD card was corrupted and I had to reload Debian along with WeeWx. I lost a years' worth of data. Is there a way to recover the files and where should I look on my old SD card?

--
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...@googlegroups.com.

vince

unread,
May 2, 2020, 8:46:46 PM5/2/20
to weewx-user
On Saturday, May 2, 2020 at 4:55:42 PM UTC-7, Michael Sanphillipo wrote:
My Pi SD card was corrupted and I had to reload Debian along with WeeWx. I lost a years' worth of data. Is there a way to recover the files and where should I look on my old SD card?

If you reimaged your corrupt SD card, that data is gone almost certainly....

FWIW, you might want to keep a couple $6 cards around in the future so if it ever happens again, you can install to a clean card and try to get your old data off the messed up one in parallel on a different system.  And as Tom said, do a backup occasionally of at least your weewx.sdb file.

Michael Sanphillipo

unread,
May 2, 2020, 9:43:47 PM5/2/20
to weewx-user
I was able to recover the weewx.sdb file and copied it over so I'm only missing May 1st and 2nd. Much better than a whole year. Is there a way to edit weewx.sdb?

Tom Keffer

unread,
May 3, 2020, 7:01:18 AM5/3/20
to weewx-user
I usually use the utility sqlite3. You may have to install it first

sudo apt install sqlite3

Some people like DB Browser for sqlite, although that will require a graphical interface.

--
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/bd455dd1-068b-4349-8fef-fcb10608a46f%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages