From SpectLog
Jump to: navigation, search

Basic approach

Go to the following web page:

Select one of the mirrors based on the following criterias:

  • Required of EPEL repository (version, architecture).
  • Geographically closest repository.
  • Repository accessible with rsync protocol.

Run the following command:

rsync -arv --progress rsync:// epel/

Partial download

If only specific version of EPEL repository is required, review repository through http protocol in the browser and select required subdirectories only.

For example, content required only for EPEL5 can be selected like this:

rsync -arv --progress rsync://{5/,5Server/,5Client/,fullfilelist,RPM-GPG-KEY-EPEL-5} epel/

Script for auto retries

Now, if the connection is not stable and unattended restart it required, run the loop until command succeeds:

 COUNTER=0; RET_VAL="1"; time while [ "$RET_VAL" != "0" ]
    rsync -arv --log-file=rsync.log.$COUNTER --progress $BASE_URL/{5/,5Server/,5Client/,fullfilelist,RPM-GPG-KEY-EPEL-5} epel/
    COUNTER="$((COUNTER + 1))"

For convenience this script can be copied-and-pasted from the 3rd line while setting BASE_URL manually.

To test retry, kill one of the rsync processes in a separate shell.

Canceling this script using Ctrl+C will cause repeated retries. Suspend it instead by Ctrl+Z and kill the job which PID can be printed by this command:

jobs -l