Is possible define a dynamic FTP "path"

48 views
Skip to first unread message

mph

unread,
Oct 2, 2019, 11:54:59 PM10/2/19
to weewx-user

Hello,

is it possible to have the target path of a FTP report dynamically modified?

My use case: I want to store the weewx reports monthly to the FTP directories as /weather/201901, /weather/201902 and so on.
Is there a way to confingure FTP path in weewx.conf using placeholders, like e.g. /weather/$Y$d?

My workarround is to copy the reports to /weather/lastmonth and use a FTP directory rename script. However I don't have the bash script written yet.


Thanks
Pavel

Andrew Milner

unread,
Oct 3, 2019, 1:21:48 AM10/3/19
to weewx-user
short answer is no

however, what exactly are you trying to do??  Reports are generated every archive interval - so if your interval is say every 5 minutes you are going to have an awful lot of reports in your 'ftp' directory.

the NOAA reports are named by month and year - and may provide what you are needing by default.

there is no 'ftp' report as such - the 'ftp report' as such is really just a mechanism for uploading the main html reports to a server via ftp.

mph

unread,
Oct 3, 2019, 11:58:39 AM10/3/19
to weewx-user
Thank you for your answer.
I do know how FTP report works.

My FTP is configured to upload the report to my website every half of hour (0/30 * * * *). I am accessing the reports usually from LAN only, so public reports every 30 minutes are perfectly OK for me.
My intent is to archive once a month or once a year the report data to a dedicated FTP folder.
Then I can access current year on /weather, last year /weather/2018, previous year /weather/2017 and so on.

Creating an FTP report timed "55 23 31 12 *" to /weather/%Y would store my year data for ever.

I can do it once a year by hand from my daily/weekly backups, but I'd like to have the system with no maintenance required.

Seems a cron job with a bash script (aka my own FTP "report") would be the only solution.


Thank you
Pavel

Dne čtvrtek 3. října 2019 7:21:48 UTC+2 Andrew Milner napsal(a):
Reply all
Reply to author
Forward
0 new messages