Upload seasons report to FTP only

59 views
Skip to first unread message

Philipp

unread,
Aug 22, 2020, 11:16:38 AM8/22/20
to weewx-user
Hi everyone,

I've successfully set up weewx on my Raspberry Pi and the reports generated by I are exactly what I have been looking for. 
I am however a bit afraid that the SD card in my Pi won't last very long as weewx is generating and writing a new weather report every 5 minutes. This is why I prefer to transfer my report to another server with a regular HDD. 
The problem is this: I simply want to transfer my report via FTP only and no longer have the report on the Pi. Disabling [[SeasonsReport]] did however stop generating all reports together, including the FTP one. Is there a way to have my [[SeasonsReport]] transferred to my FTP server but not written locally on the Pi?

Thanks in advance
Philipp

p q

unread,
Aug 22, 2020, 11:43:15 AM8/22/20
to weewx...@googlegroups.com
I don't have an answer for you, but I've been running Weewx on raspi for 4 years without a problem with an SD card. I know there are others who have been running much longer.

--
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/4be84e6d-3f9e-4451-9aee-1911d2d5b285n%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Garry A Lockyer

unread,
Aug 22, 2020, 12:02:28 PM8/22/20
to weewx...@googlegroups.com
Don’t think so!

WeeWx needs a place (a folder) to create its web pages.  I suppose that folder could be on a network / remote drive but it is usually on the local system.  It’s likely that a network drive will be slower than a local folder.

I too was concerned about burning out SD cards so I implemented a temporary file system in local memory and use it for all webpage files.  It has the advantage of being very fast.

I don’t have a link to the instructions to set up a temporary file system handy but you should be able to find them by searching for “weewx minimize so card write.”

Regards,

Garry Lockyer
E: Ga...@Lockyer.ca


On Aug 22, 2020, at 08:43, p q <peterq...@gmail.com> wrote:



Graham Eddy

unread,
Aug 22, 2020, 12:12:52 PM8/22/20
to weewx...@googlegroups.com
i also do not like to generate weewx reports to RPi’s SD card so i mount weewx/public_html on tmpfs - reads and writes to RAM only. being tmpfs (RAM) the content is lost on reboot, but it is all generated again anyway, just adds some milliseconds to the first reports after a reboot

phillip could generate files and FTP as much as he likes, all the files would be in RAM, not the SD card

requires an entry like the following added to /etc/fstab (all one line)
tmpfs /opt/weewx/public_html tmpfs rw,nodev,nosuid,noatime,noexec,size=10M 0 0                                   
where put your own weewx/public_html location instead of the one above.
it will only take effect next reboot so to make it happen now, after changing /etc/fstab, run
$ sudo mount -a

it might complain about files already existing in your weewx/public_html directory (on SD). it is harmless to mount over them; they will be hidden underneath. but it would be cleaner to stop weewx, remove the files in weewx/public_html on SD, mount tmpfs on weewx/public_html, start weewx again

and don’t worry about the ‘size=10M’ option - that is the *maximum* memory it can use. it only uses as much as it needs

Michael Form

unread,
Aug 22, 2020, 2:28:35 PM8/22/20
to weewx...@googlegroups.com
Philipp:

Why don't you just boot and use a SSD for the Pi storage. SSDs are much more reliable, especially for all of the writes, and longer lasting than an SD card. You can get a relatively inexpensive 250 or 500 GB SSD which should give you plenty of storage.  There are many descriptions on how to do this for the Pi3 and Pi4 on the web.

Good luck.

Michael

vince

unread,
Aug 22, 2020, 3:06:17 PM8/22/20
to weewx-user
On Saturday, August 22, 2020 at 8:16:38 AM UTC-7, Philipp wrote:
Is there a way to have my [[SeasonsReport]] transferred to my FTP server but not written locally on the Pi?


Set your document root to be something in a tmpfs partition and it won't be writing those to SD card.

If you do something like this in /etc/fstab, it "should" put your normal archive directory in a tmpfs partition:

     # this is for a setup.py install
tmpfs /home/weewx/archive tmpfs defaults,nosuid,mode=0755,nodev,noatime 0 0
 

Tom Keffer

unread,
Aug 22, 2020, 6:51:25 PM8/22/20
to weewx-user
I have yet to see any evidence that the lifespan of SD cards is a problem. The only actual data I'm aware of is my own RPi experiment, which has been running for well over five years with zero problems.

Get a good quality card and a UPS and forget about it. Like any other storage device, you need to back it up.

-tk


--
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.

Philipp

unread,
Aug 23, 2020, 12:10:35 PM8/23/20
to weewx-user
Thanks everyone for your advice!
For now I'll stick with a tmpfs partition for my report directory - better safe than sorry!

Reply all
Reply to author
Forward
0 new messages