Skip to content

Instantly share code, notes, and snippets.

@azet
Created October 13, 2014 15:48
Show Gist options
  • Save azet/6c5da818cd74bdfc239f to your computer and use it in GitHub Desktop.
Save azet/6c5da818cd74bdfc239f to your computer and use it in GitHub Desktop.
centos6{5..9} mirror hack
[root@mirror cron.hourly]# pwd
/etc/cron.hourly
[root@mirror cron.hourly]# cat mirror_centos6
#!/usr/bin/env bash
[[ $(pgrep rsync) ]] && exit 0
cd /net/gmi.oeaw.ac.at/software/mirror/centos/
./mirror.sh &>> rsync_mirror.log
exit 0
[root@mirror cron.hourly]# cat /net/gmi.oeaw.ac.at/software/mirror/centos/mirror.sh
#!/usr/bin/env bash
date -R
rsync --progress -av --delete --delete-excluded --exclude "local*" --exclude "isos" --exclude "i386" ftp.halifax.rwth-aachen.de::centos/6.{5..9} $(pwd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment