How to add multiple baseurl entries in repo files
This document (000019926) is provided subject to the disclaimer at the end of this document.
SUSE Linux Enterprise Server 12 SP5
Sometimes, for failover in cases the update server is not available, multiple baseurl entries are helpful.
Zypper/libzypp supports parsing multiple baseurls.
Per default the .repo files are in /etc/zypp/repos.d/.
An example of such a .repo file is: "SUSE_Linux_Enterprise_Server_12_SP5_x86_64:SLES12-SP5-Pool.repo"
[SUSE_Linux_Enterprise_Server_12_SP5_x86_64:SLES12-SP5-Pool] name=SLES12-SP5-Pool enabled=1 autorefresh=0 baseurl=https://a...... type=rpm-md service=SUSE_Linux_Enterprise_Server_12_SP5_x86_64Enter the additional baseurl either as:
or a combination of both.
Since SLES15 SP1/2 (libzypp v 17.25.8) it is possible to add the urls in one line separated by blanks, optionally together with a comma ( " " or ", " or " ," or " , ")
ZYPP (zypper) uses the 1st URL. Additional URLs are just used as fallback in case the previous one(s) failed.
After adding the urls, a zypper refresh is recommended
If the repos are provided by a service, changes (manually or via zypper) may be volatile.
The next service refresh may restore the repos settings.
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000019926
- Creation Date: 24-Mar-2021
- Modified Date:24-Mar-2021
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com