Hi

I do a similar things with the following script:
#!/bin/bash

REPOS="repo1 repo2 repo3"

for REPO in ${REPOS}
do
  /usr/bin/spacewalk-repo-sync --channel ${REPO} --type yum
done

The reason we run it in a cron job is to freeze the repositories when required so that we can patch all our servers to the same level. Once all our servers are patched we re-enable the cronjob until the next patching cycle.

Kobus

On 06/10/2014 18:05, Alan Pittman wrote:

Hi,

Everyone has their own personal preferences, I personally like to set up a script, like this:

#!/bin/bash

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-elrepo --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-rhn-tools --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-supplementary --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-updates --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-mondo --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-epel --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-spacewalk-client --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-fastrack --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-productivity --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-vt --type yum

/usr/bin/spacewalk-repo-sync --channel rhel-64bit-server-5-rhev-agent --type yum

And then use crontab to schedule it:

33 03 6,13,20,27 * * /usr/local/bin/sync-5Server-64.sh

Hope this helps a little.

Alan

*From:*[email protected] [mailto:[email protected]] *On Behalf Of *Alexander Dacre
*Sent:* Monday, October 06, 2014 12:49 PM
*To:* [email protected]
*Subject:* Re: [Spacewalk-list] Thanks first, for answering all my questions

Hi,

You can do this via the web interface or spacewalk-repo-sync found in spacewalk-utils.

Thanks,

Alex Dacre

Systems Engineer

+44 131 560 1466

*From:*[email protected] <mailto:[email protected]> [mailto:[email protected]] *On Behalf Of *Kartik Vashishta
*Sent:* 06 October 2014 17:47
*To:* [email protected] <mailto:[email protected]>
*Subject:* [Spacewalk-list] Thanks first, for answering all my questions

Next question: How do I schedule all repos to be sync'd?



_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list


--


Trustpay Global Limited is an authorised Electronic Money Institution regulated by the Financial Conduct Authority registration number 900043. Company No 07427913 Registered in England and Wales with registered address 130 Wood Street, London, EC2V 6DL, United Kingdom.

For further details please visit our website at www.trustpayglobal.com.

The information in this email and any attachments are confidential and remain the property of Trustpay Global Ltd unless agreed by contract. It is intended solely for the person to whom or the entity to which it is addressed. If you are not the intended recipient you may not use, disclose, copy, distribute, print or rely on the content of this email or its attachments. If this email has been received by you in error please advise the sender and delete the email from your system. Trustpay Global Ltd does not accept any liability for any personal view expressed in this message.
_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to