RSync using NFS

74 views
Skip to first unread message

Mark Fraser

unread,
Mar 2, 2023, 3:24:38 AM3/2/23
to weewx...@googlegroups.com
I have set up file sharing between 2 devices using NFS so that I don't have to store passwords. Is it possible to have weewx rsync over this connection as it seems to want a server name and port as part of the configuration?

cric...@pobox.com

unread,
Mar 2, 2023, 10:26:38 AM3/2/23
to weewx-user
Well...not exactly.  I didn't look to see what weewx does with the empty server in the config, but either way rsync still works over ssh, which
isn't nfs.  Just straight using nfs, you soft link could link between your weewx directory and your destination on the other machine.
Or you can set up passwordless ssh so that rsync works.  ssh uses keys, and at least one (.pub) needs to be on the remote end.

What problem are you trying to solve?  Some more clear details would get you a better answer.

Chris

vince

unread,
Mar 2, 2023, 12:37:45 PM3/2/23
to weewx-user
Set your server to 127.0.0.1 and rsync-over-ssh to yourself.   Just follow the same procedure you'd do for setting up a remote system.  You need a /root/.ssh/config file and the public key you use should be in /root/.ssh/authorized_keys on the weewx system.

paul.ba...@gmail.com

unread,
Mar 4, 2023, 4:13:23 PM3/4/23
to weewx-user

Hello,
I don't understand why you want to use rsync over NFS. 
NFS juste does all the work for you. 
Once the remote file system is  mounted, usually at boot or login depending on the setup, there is no more distinction between the local files and the remote ones. 
So, in weewx.conf
  - disable rsync
  - set HTML_ROOT = <your NFS remote directory>
something like 
        HTML_ROOT = /www/html/weewx
NFS will know where /www/ is installed, of course this is defined in the NFS setup.
Regards,     Paul
PS Remember, in the mid 80's  SUN said
           The network IS the computer

Mark Fraser

unread,
Mar 5, 2023, 9:17:15 AM3/5/23
to weewx...@googlegroups.com
On 04/03/2023 21:13, paul.ba...@gmail.com wrote:
>
> Hello,
> I don't understand why you want to use rsync over NFS.
> NFS juste does all the work for you.
> Once the remote file system is  mounted, usually at boot or login
> depending on the setup, there is no more distinction between the local
> files and the remote ones.
> So, in weewx.conf
>   - disable rsync
>   - set HTML_ROOT = <your NFS remote directory>
> something like
>         HTML_ROOT = /www/html/weewx
> NFS will know where /www/ is installed, of course this is defined in the
> NFS setup.
> Regards,     Paul
> PS Remember, in the mid 80's  SUN said
>            The network IS the computer

Thanks Paul,
I'd forgotten I'd set up NFS to share the pages I wanted to sync.

The reason I'm doing this is originally I had weewx with weewx-sdr
running outside on a Pi fitted inside an old security camera that was
capturing data using a cheap DVB-T USB stick. This would occasionally
stop receiving data from one sensor so I upgraded to a Nooelec RTL-SDR
v5. While I was finding time to replace the DVB-T stick I ran weewx on
my server with the Nooelec.

This was working, but I didn't want to open up port 80 on the server to
the outside world. So I was copying the data over to the Raspberry Pi
which did have an outside connection.
Reply all
Reply to author
Forward
0 new messages