Re: Maintaining a local yum repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



macgyver <macgyver <at> calibre-solutions.co.uk> writes:

> are clearing it out - so might be worth updating one machine first, then
> running the following on the other two "client" machines 
> 
> rsync -av <firsthost>:/var/cache/yum/ /var/cache/yum/
> 

I have been using the following script from my main machine that I do 
main yum updates from, to push the update rpms to the other machines:

#!/bin/bash
#
# rsync yum update packages to other machines
#
#Mike 13th July 06
#

if [ -z "$1" ]; then
        DEST_MACHINE=othermachine
# default client defined above
else
        DEST_MACHINE=$1
fi

list="fedora updates updates-testing livna"

for i in $list
do
echo Copying $i packages to $DEST_MACHINE...
rsync -av -e ssh /var/cache/yum/$i/packages/*
$DEST_MACHINE:/var/cache/yum/$i/packages/

echo Copying $i headers to $DEST_MACHINE...
rsync -av -e ssh /var/cache/yum/$i/headers/*
$DEST_MACHINE:/var/cache/yum/$i/headers/
rsync -av -e ssh /var/cache/yum/$i/headers/*
$DEST_MACHINE:/var/cache/yum/$i/headers/
done

echo Done
  exit 0

This can easily be modified for your situation...
Note that the rsync lines run over two lines above - make them into single
lines. Hope this helps.

The way I use this script is to run it from the machine where I first run
updates, and then push the rpms to the other machines - the meta data are
not copied but could easily be added to the script. Then just do a yum update
on the machine which has the new rpms. It is easy to do the main update in
a cron job and then run this script in another cron job a while later.
Other machines can then run their yum updates in later cron jobs if you want
to automate the process.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux