Search

13.5. Automating Synchronization

download PDF
Manually synchronizing the Red Hat Satellite repository with Red Hat Network is a time-intensive task. United States business hours tend to be the peak usage time for Red Hat Network, so synchronization during that time can be slow. Red Hat encourages customers to automate synchronization at other times to better balance load and ensure quick synchronization. Continental United States business hours are roughly 8:00 AM to 9:00 PM EST (UTC -5), due to four time zones, Monday through Friday. These hours vary seasonally by one hour. Red Hat strongly recommends synchronization during a particular time range. This ensures better synchronization performance.
Set this automation with the addition of a simple cron job. Edit the crontab as root:
crontab -e
This opens the crontab in your default text editor.

Note

Change your default text editor using the EDITOR variable, like so: export EDITOR=gedit. Choosing a graphical editor will require an enabled graphical interface.
Once opened, use the first five fields (minute, hour, day, month, and weekday) to schedule the synchronization. Use 24-hour clock format. Edit the crontab to include random synchronization, like so:
0 1 * * * perl -le 'sleep rand 9000' && satellite-sync --email >/dev/null \
2>/dev/null
This cronjob will run randomly between 1:00 a.m. and 3:30 a.m. system time each night and redirect stdout and stderr from cron to prevent duplicating the more easily read messages from satellite-sync. Use other options from Section 9.1, “Red Hat Satellite Synchronization Tool” if necessary.
After saving the file and exiting the editor, the system installs the modified crontab immediately.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.