Weewx FTP not uploading some files

93 views
Skip to first unread message

peredst...@gmail.com

unread,
Dec 26, 2021, 10:40:00 AM12/26/21
to weewx-user
I have a script that makes a pgn-graph over the WAN-speed (mobile connection so it varies some over time). I put this image in the Weewx html-root so that Weewx FTP would upload it at the same time as all the other files.

But it doesn't. But only this non-Weewx-file. I "touched" a foo.bar and it got uploaded.

From the #FTP last -file:

pi@RPi-3Bp-Arelien:/var/www/html/weewx $ more \#FTP.last |grep wan
aV/var/www/html/weewx/wanspeed.png

So, what does "aV" stand for? The files that are uploaded get "aS" as a prefix.

I see that some more files as also not uploaded, I guess as they are not changed and hence don't need to be uploaded. But my "wanspeed.png" is changed every 15 min.

Karen K

unread,
Dec 26, 2021, 1:35:03 PM12/26/21
to weewx-user
#FTP.last is a binary file. So that 'aV' may not be connected to the following file name. Id not not understand the command more in connection with grep. more is an interactive command. Its output cannot be piped to another command. I guess most people would use grep allone like 
grep search-text file-name

peredst...@gmail.com

unread,
Dec 26, 2021, 1:51:41 PM12/26/21
to weewx-user
Well, it works very well to pipe "more" into "grep" to search for a text string.

More prints the entire file content (as there is no terminal to limit output). Grep searches the output.

The file is a readable text file. Not a binary one. It lists transfered files.

Tom Keffer

unread,
Dec 26, 2021, 3:50:31 PM12/26/21
to weewx-user
The file #FTP.last just keeps track of when a file was last uploaded. It's in Python "pickle" format, which is a binary format.

If it's corrupted, it can be deleted at any time. The only consequence is that all files will be uploaded at the next reporting cycle, not just the changed ones.

-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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0a8dedd2-13f3-4638-988a-104343309342n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages