-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Now when EL10 was released the mirror server has had issues actually retrieving the entire mirror.
After a few minutes the connection gets reset and only a few 10 of GB is transferred each time. To improve on this there should maybe be a retry function.
Example code:
`#!/bin/bash
ABOUT
Runs rsync, retrying on errors up to a maximum number of tries.
Simply edit the rsync line in the script to whatever parameters you need.
Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM
MAX_RETRIES=50
i=0
Set the initial return value to failure
false
while [ $? -ne 0 -a $i -lt $MAX_RETRIES ]
do
i=$(($i+1))
rsync -avz --progress --partial /rsync/source/folder backupuser@backup.destination.com:/rsync/destination/folder
done
if [ $i -eq $MAX_RETRIES ]
then
echo "Hit maximum number of retries, giving up."
fi`
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request