A trailing slash means copy the contents of the directory.
Note that WeeWX code will add the slash if it is a directory.  See code snippet below.

        # If the source path ends with a slash, rsync interprets
        # that as a request to copy all the directory's *contents*,
        # whereas if it doesn't, it copies the entire directory.
        # We want the former, so make it end with a slash.
        # Note: Don't add the slash if local_root isn't a directory
        if self.local_root.endswith(os.sep) or not os.path.isdir(self.local_root):
            rsynclocalspec = self.local_root
        else:
            rsynclocalspec = self.local_root + os.sep


On Nov 15, 2022, at 7:33 AM, cric...@pobox.com <crich...@pobox.com> wrote:

A couple of points about the trailing slashes.  A trailing slash means copy the contents of the directory.  The --archive
means copy everything below the specified directory.  Not including a trailing slash means copy this directory and with
--archive, everything below it.  It's not a matter of rsync not working because of the slashes, it just does two similar, but
different things.  The man pages for rsync are pretty good.
As for the ssh keys, I'm pretty sure you can just copy the ~fiaranch/.ssh/id_rsa to ~root/.ssh.  No need to create root-specific
key pair and copy the public server's .ssh directory.  Oh, one other thing that's really important:

The .ssh directory permissions are critical.  The directory itself must be chmod 0700.  The files inside it should be chmod 0600.
This is true for all the .ssh directories on both ends of the connection.

My setup is a little different; I rsync to another local machine that runs a web server.  Then I've got a separate script for
publishing the weewx (and a few other sites) to a public host, since the various href's need to be updated.

On Tuesday, November 15, 2022 at 5:25:11 AM UTC-7 Greg Troxel wrote:

"gszla...@gmail.com" <gszla...@gmail.com> writes:

> 1. Vince is correct. WeeWX runs as root and RSA generation must be done as
> root.

I was sure Vince was correct to start with :-) but I think running weewx
as root is the wrong thing to do. I run it as a non-root user, and
really there should be a dedicated weewx user that has permissions to do
what it needs (read the serial port, write the db, access credentials
for upload) and no more.

But this is really "how best to configure weewx on operating system X",
which is orthogonal to "how should I made weewx on system X already
configured as Y work".

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a69561f5-048a-4e2f-bc8f-e009a9cc2911n%40googlegroups.com.

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/E14937D0-EDC4-4C7B-9500-D716F41C09B4%40johnkline.com.

Reply via email to