On Tue, Sep 10, 2019 at 10:33 PM Linux Kamarada
For what I want to do, I believe wget is going to suffice. If you find anything easier or more usual with rsync, please share.
So, in short, in case anyone else needs, my conclusion is: to mirror an Open Build Service repository (e.g. home:myusername) using wget, run the following.
$ cd /local/folder/
$ wget -m -nH --cut-dirs=3 -np --reject 'index.*,*.meta4,*.metalink,*.mirrorlist' -e robots=off https://download.opensuse.org/repositories/home:/myusername/
(mind the cut-dirs argument, which, in that example, says to skip the repositories/home:/myusername/ path when creating the local hierarchy)
A downside of mirroring with wget is that deleted files on OBS are not
deleted locally... I'll try to workaround that.
In fact, wget seems more as a workaround than as a solution. The best
possible solution would be to use rsync...
On Wed, Sep 11, 2019 at 1:21 AM Malcolm
Hi I just use osc getbinaries to pull down packages locally, re-locate as required and then can use createrepo.
Hi, Malcolm, thanks for your suggestion! I imagine it is even scriptable, but it seems to me that it is not the easiest way (recreating the repo), so maybe I'll try it later... I'm now thinking on an algorithm like this: 1 Download everything from OBS (using wget, as above) 2 For each file stored locally: 2.1 Check whether the file exists online (for example, trying to download it and receiving HTTP 304 Not Modified or HTTP 404 Not Found, maybe that is possible using wget too) 2.1.1 If it does not exist online, delete it Antonio The Linux Kamarada Project http://kamarada.github.io/ -- To unsubscribe, e-mail: heroes+unsubscribe@opensuse.org To contact the owner, e-mail: heroes+owner@opensuse.org