[rsync] Mirroir local (résolu)
Publié : sam. 23 mai 2015, 16:44
Bonjour,
J'aimerai créer un mirror local et j'ai trouvé ceci sur le wiki https://wiki.archlinux.org/index.php/Local_Mirror. J'ai commencé à modifier le script proposé comme suit:
Après dans le fichier /media/archlinux/pacman-ignore.txt , j'ai mis:
Ca a lancé mais il y avait pas de retours donc je relu le wiki mais comme c'est en anglais, au final je suis perdu donc si quelqu'un peut m'aider. Je n'ai pas bien compris les trucs de Tier 1 et 2 et surtout mon idée est de faire mirroir qui fonctionne la nuit et qui synchronise seulement certains paquets (KDE, core).
Merci
J'aimerai créer un mirror local et j'ai trouvé ceci sur le wiki https://wiki.archlinux.org/index.php/Local_Mirror. J'ai commencé à modifier le script proposé comme suit:
Code : Tout sélectionner
#!/bin/bash
#################################################################################################
### It is generally frowned upon to create a local mirror due the bandwidth that is required.
### One of the alternatives will likely fulfill your needs.
### REMEMBER:
### * Bandwidth is not free for the mirrors. They must pay for all the data they serve you
### => This still applies although you pay your ISP
### => There are many packages that will be downloaded that you will likely never use
### => Mirror operators will much prefer you to download only the packages you need
### * Really please look at the alternatives on this page:
### https://wiki.archlinux.org/index.php?title=Local_Mirror
### If you are ABSOLUTELY CERTAIN that a local mirror is the only sensible solution, then this
### script will get you on your way to creating it.
#################################################################################################
# Configuration
SOURCE='rsync://mirror.23media.de/archlinux/'
DEST='/media/archlinux/mirror'
BW_LIMIT='20k'
REPOS='core extra community multilib'
RSYNC_OPTS="-rtlHq --delete-after --delay-updates --copy-links --safe-links --max-delete=1000 --bwlimit=${BW_LIMIT} --delete-excluded --exclude-from=/media/archlinux/pacman-ignore.txt"
LCK_FLE='/media/archlinux/repo-sync.lck'
PATH='/usr/bin'
# Make sure only 1 instance runs
if [ -e "$LCK_FLE" ] ; then
OTHER_PID=$(cat $LCK_FLE)
echo "Another instance already running: $OTHER_PID"
exit 1
fi
echo $$ > "$LCK_FLE"
for REPO in $REPOS ; do
echo "Syncing $REPO"
rsync $RSYNC_OPTS ${SOURCE}/${REPO} ${DEST}
done
# Cleanup
rm -f "$LCK_FLE"
exit 0
Code : Tout sélectionner
.*i686.*
Merci