[opensuse] Mirroring some files locally from a repository
Hi, I copy or mirror the 15.1 kernel and other files locally. I use: #!/bin/bash wget -r -l1 --no-parent -nd -A "kernel*rpm" -A "nfs-kernel*rpm" -A "virtualbox*rpm" "http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/" wget -r -l1 --no-parent -nd -A "kernel*rpm" -A "virtualbox*rpm" "http://download.opensuse.org/distribution/leap/15.1/repo/oss/noarch/" I see this in the output: --2019-06-10 18:33:55-- http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/kernel-v... Connecting to download.opensuse.org (download.opensuse.org)|195.135.221.134|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 8040856 (7,7M) [application/x-rpm] Saving to: ‘kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp’ kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm 100%[=============================================================================================================>] 7,67M 1,63MB/s in 5,3s 2019-06-10 18:34:00 (1,46 MB/s) - ‘kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp’ saved [8040856/8040856] Removing kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp since it should be rejected. So first it downloads that file (slowly sometimes), then removes it, probably because there is already a local copy. How could I improve my download command line so that it doesn't download things that it is going to delete later, wasting time? -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
10.06.2019 19:42, Carlos E. R. пишет:
Hi,
I copy or mirror the 15.1 kernel and other files locally. I use:
#!/bin/bash wget -r -l1 --no-parent -nd -A "kernel*rpm" -A "nfs-kernel*rpm" -A "virtualbox*rpm" "http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/" wget -r -l1 --no-parent -nd -A "kernel*rpm" -A "virtualbox*rpm" "http://download.opensuse.org/distribution/leap/15.1/repo/oss/noarch/"
I see this in the output:
--2019-06-10 18:33:55-- http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/kernel-v... Connecting to download.opensuse.org (download.opensuse.org)|195.135.221.134|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 8040856 (7,7M) [application/x-rpm] Saving to: ‘kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp’
kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm 100%[=============================================================================================================>] 7,67M 1,63MB/s in 5,3s
2019-06-10 18:34:00 (1,46 MB/s) - ‘kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp’ saved [8040856/8040856]
Removing kernel-vanilla-devel-4.12.14-lp151.26.4.x86_64.rpm.1.tmp since it should be rejected.
So first it downloads that file (slowly sometimes), then removes it, probably because there is already a local copy.
-nd says to save multiple file versions with additional suffix and -A says to throw away anything that does not end with ".rpm".
How could I improve my download command line so that it doesn't download things that it is going to delete later, wasting time?
You probably want --no-clobber or --continue.
On 10/06/2019 19.19, Andrei Borzenkov wrote:
10.06.2019 19:42, Carlos E. R. пишет:
Hi,
I copy or mirror the 15.1 kernel and other files locally. I use:
#!/bin/bash wget -r -l1 --no-parent -nd -A "kernel*rpm" -A "nfs-kernel*rpm" -A "virtualbox*rpm" "http://download.opensuse.org/distribution/leap/15.1/repo/oss/x86_64/"
...
So first it downloads that file (slowly sometimes), then removes it, probably because there is already a local copy.
-nd says to save multiple file versions with additional suffix and -A says to throw away anything that does not end with ".rpm".
Oh. I simply copied the line from somewhere else. The intention is to download anything with the given pattern, but only those, and not download things that exist already.
How could I improve my download command line so that it doesn't download things that it is going to delete later, wasting time?
You probably want --no-clobber or --continue.
Probably the later, and remove "-nd". -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
participants (2)
-
Andrei Borzenkov
-
Carlos E. R.