rsync to mirror repository gives ERROR: Unknown module 'distribution'

I’m trying to create a mirror of the LEAP 15.1 repositories for a machine with no Internet access. The command

rsync -avz --delete rsync://rsync.opensuse.org/distribution/leap/15.1/repo/oss/ "/run/media/root/DFS1JFS64/Vendors/openSUSE/repos/oss"

gives me

This is rsync.opensuse.org, public rsync server of openSUSE.org,
limited to 50 connections.

If you run a public mirror, please get in contact so we can give you 
access to the stage rsync server.
You'll find conditions for access and further information at
http://en.opensuse.org/Mirror_Infrastructure

Thanks!
admin@opensuse.org

@ERROR: Unknown module 'distribution'
rsync error: error starting client-server protocol (code 5) at main.c(1672) [Receiver=3.1.3]

Am I using the right URL? If so, what am I doing wrong? Thanks.

Hi
Since it’s the ‘distribution’ just download the iso image and use that as a local repository. Nothing changes between that location and the DVD after install. Look at rsyncing the update mirror…

For an rsync mirror, have a look here and pick an rsync one close to your locale with the ‘disribution’ check the http link and change for rsync;

https://mirrors.opensuse.org/

I already have the ISO burned to a DVD; what I want are the oss, nonoss, oss update, nonoss update, packman essentials and publishing (texlive) repositories for things that are not on the ISO, e.g., stix2.

Maybe you have been too quick?

Looking at https://mirrors.opensuse.org/ I find e.g. an rsync mirror at

rsync://mirror.gtlib.gatech.edu/opensuse/

No

If so, what am I doing wrong?

You need to use the right top-level rsync module. Now I could not find any description what paths one actually has to use with rsync; list of modules is here: https://mirrors.opensuse.org/list/rsyncinfo-rsync.o.o.txt, but you still need the correct paths below. Which becomes finally rsync://rsync.opensuse.org/opensuse-full/opensuse/distribution/leap/15.1/repo/oss/ (substitute opensuse-full with any other suitable module as needed). You can start with modules list and poke around with something like

bor@bor-Latitude-E5450:~$ rsync --list-only rsync://rsync.opensuse.org/opensuse-full/

This is rsync.opensuse.org, public rsync server of openSUSE.org,
limited to 50 connections.


If you run a public mirror, please get in contact so we can give you 
access to the stage rsync server.
You'll find conditions for access and further information at
http://en.opensuse.org/Mirror_Infrastructure


Thanks!
admin@opensuse.org




drwxr-xr-x             30 2017/09/06 14:27:19 .
drwxr-xr-x            188 2018/09/06 22:22:01 opensuse
bor@bor-Latitude-E5450:~$ rsync --list-only rsync://rsync.opensuse.org/opensuse-full/opensuse/


This is rsync.opensuse.org, public rsync server of openSUSE.org,
limited to 50 connections.


If you run a public mirror, please get in contact so we can give you 
access to the stage rsync server.
You'll find conditions for access and further information at
http://en.opensuse.org/Mirror_Infrastructure


Thanks!
admin@opensuse.org




drwxr-xr-x            188 2018/09/06 22:22:01 .
drwxr-xr-x             81 2019/05/22 14:54:32 distribution
drwxr-xr-x          4,096 2019/09/14 08:00:01 history
drwxr-xr-x            154 2017/06/27 11:59:47 ports
drwxr-xr-x            138 2019/05/22 14:57:41 update
bor@bor-Latitude-E5450:~$ 

Does rsync://rsync.opensuse.org/opensuse-full/opensuse/distribution contain the packages that are not on the ISO? rsync://rsync.opensuse.org/opensuse-full/opensuse/ports?

Does rsync://rsync.opensuse.org/opensuse-full/opensuse/update contain both oss and nonoss? Is there a description of what is at each URL?

It contains both, the packages and the ISOs.

Did you forget the terminating “/” (slash) of the URL when using rsync?

Without terminating “/” (slash), and using a mirror, I get

> rsync --list-only rsync://mirror.clarkson.edu/opensuse/distribution

    __  ____                 
   /  |/  (_)__________  ____
  / /|_/ / / __/ __/ _ \/ __/
 /_/  /_/_/_/ /_/  \___/_/   
                                              


drwxr-xr-x              5 2019/05/22 13:54:32 distribution
> 

With terminating “/” (slash) included, I get

> rsync --list-only rsync://mirror.clarkson.edu/opensuse/distribution/

    __  ____                 
   /  |/  (_)__________  ____
  / /|_/ / / __/ __/ _ \/ __/
 /_/  /_/_/_/ /_/  \___/_/   
                                              


drwxr-xr-x              5 2019/05/22 13:54:32 .
lrwxrwxrwx              9 2019/05/22 13:54:29 openSUSE-current
lrwxrwxrwx              9 2019/05/22 13:54:32 openSUSE-stable
drwxr-xr-x              7 2019/08/09 11:56:19 leap
> 

And yes

Poking about/around a bit you’ll further find

> rsync --list-only rsync://mirror.clarkson.edu/opensuse/distribution/leap/15.1/

    __  ____                 
   /  |/  (_)__________  ____
  / /|_/ / / __/ __/ _ \/ __/
 /_/  /_/_/_/ /_/  \___/_/   
                                              


drwxr-xr-x              6 2019/08/09 11:55:32 .
drwxr-xr-x              7 2019/05/15 15:55:41 iso
drwxr-xr-x             46 2019/09/16 21:54:09 jeos
drwxr-xr-x             16 2019/09/16 21:50:01 live
drwxr-xr-x              4 2018/07/20 11:50:42 repo
> 

where ‘iso’ contains the ISOs, and where ‘repo’ - in its subdirectories ‘oss’ and ‘non-oss’ - contains the packages including those that are not on the ISO.

This is similar

> rsync --list-only rsync://mirror.clarkson.edu/opensuse/update/leap/15.1/

    __  ____                 
   /  |/  (_)__________  ____
  / /|_/ / / __/ __/ _ \/ __/
 /_/  /_/_/_/ /_/  \___/_/   
                                              


drwxr-xr-x              4 2018/08/07 11:30:13 .
drwxr-xr-x              7 2019/09/10 07:41:46 non-oss
drwxr-xr-x              9 2019/09/16 21:21:27 oss
> 

The structure of the subdirectories is the same as in
http://download.opensuse.org/distribution/leap/15.1/repo/”](http://download.opensuse.org/distribution/leap/15.1/repo/)
for the packages, and in
http://download.opensuse.org/update/leap/15.1/”](http://download.opensuse.org/update/leap/15.1/)
for the updates.

And again, running a Leap 15.1 with the online repos included, you’ll see the same directory tree as before from the output of

zypper lr -d

Well, I believe that I have the right directory structure now, but it’s till not downloaeding anything:

linux-gn5l:~ # rsync -avz --delete --exclude="00Archived" --exclude="archived" --exclude="{debuginfo,debugsource}" --exclude="/**/SRPMS/" --exclude="**/*-debug-*" --exclude="**/*-debuginfo-*" --exclude="**/*-debugsource-*" --exclude="**/*.src.rpm" --include="*.rpm" --exclude="*" rsync://rsync.opensuse.org/opensuse-full/opensuse/distribution/leap/15.1/repo/oss /run/media/root/DFS1JFS64/Vendors/openSUSE/repos/oss

This is rsync.opensuse.org, public rsync server of openSUSE.org,
limited to 50 connections.

If you run a public mirror, please get in contact so we can give you 
access to the stage rsync server.
You'll find conditions for access and further information at
http://en.opensuse.org/Mirror_Infrastructure

Thanks!
admin@opensuse.org


receiving incremental file list

sent 183 bytes  received 7 bytes  76.00 bytes/sec
total size is 0  speedup is 0.00


You told it to exclude everything (–exclude=*) and it excludes everything. This is explained in full in rsync manual.

Not according to the rsync man page.

This is explained in full in rsync manual.

That’s what I relied on:

As the list of files/directories to transfer is built, rsync checks each name to be transferred against the list of include/exclude patterns in turn, and the first matching pattern is acted on:

The first matching paatern should have been *.rpm.

Before this pattern can match, rsync needs to descend directory tree to reach directory with *.rpm files. But it is not possible because all top-level directories are already excluded by * pattern. And exactly your case is described pretty well in rsync manual if you actually read past the second paragraph in FILTER RULES. Hint: you may even need to read next section(s) past FILTER RULES section …

The problem is that I needed an include of “*/” after all of the directory excludes.