Skip to content

Instantly share code, notes, and snippets.

@tuxfight3r
Created July 13, 2015 10:45
Show Gist options
  • Save tuxfight3r/20ce0166b6bbc330e1bb to your computer and use it in GitHub Desktop.
Save tuxfight3r/20ce0166b6bbc330e1bb to your computer and use it in GitHub Desktop.
Centos updates via rsync behind proxy
#!/bin/bash
Purpose: Sync centos7 repos via rsync behind proxy
Author: Mohan
#Makesure rsync port 873 is allowed outbound on the squid proxy
export RSYNC_PROXY=192.168.2.250:3128
#create directory structure
mkdir -p /opt/repo/yum/centos/{os,updates}
#Update Base Repo
#cd /opt/repo/yum/centos/os
rsync -avzr --progress rsync://mirror.nl.leaseweb.net/centos/7.1.1503/os/ .
#Update Updates Repo
#cd /opt/repo/yum/centos/updates
rsync -avzr --progress rsync://mirror.nl.leaseweb.net/centos/7.1.1503/updates/ .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment