Repository Sychronization Script
This is a repository synchronization script for Fedora. It enables administrators to synchronize a local mirror of several repositories using the RSYNC protocol. Currently supported repositories are Fedora Core, Updates, Extras, Source and Livna.
Why a repository synchronization script?
When having several machines running Fedora, installing and updating these machines may cause a huge load on your Internet connection, and it may be slow -slower then your LAN-. If you're not using a caching proxy server to connect your machines to the Internet, you may also be downloading the same files over and over again with each machine you install or update. This causes "unnecessary" traffic. To create such a local mirror, you need to update and synchronize your mirror every now and then.
What does the synchronization script do?
The synchronization script takes command line parameters to determine which repositories you want to synchronize. Once it has determined the complete list of repositories, it synchronizes those from a list of mirrors you specify. It really is that simple.
There are more difficult ways to sychronize your mirror, though. Some mirror scripts use hardlinks or symlinks to save you some disk space. This script doesn't, so remember that when you're running out of disk space. The disk space for one release and one architecture is about 5GB. Whenever you specify another release or architecture to synchronize, add an additional 5GB of disk space to the expected total amount of disk space your mirror will use.
The Script
Usage:
./sync_repo [OPTIONS] repo1 repo2 repo3
The options and repository parameters are described in the tables below.
| Option | description |
|---|---|
| --devel | Include all development repositories. This includes the default repositories, and their development equivalents. |
| --source | Include all source repositories. This includes the default repositories and their sources. |
| --testing | Include all testing repositories. This includes the default repositories and their testing equivalents. |
| --legacy | Include legacy repositories. |
| --debuginfo | Include debuginfo repositories. |
| --nocore | Exclude core repositories. |
| --noupdates | Exclude updates repositories. |
| --noextras | Exclude extras repositories. |
| --nolivna | Exclude livna repositories. |
| --excludenoyum | Exclude all components that are not used by yum. This, for example, includes the .iso files, as well as the 'stylesheet-images/' directory. |
| --delete | A very important option. Specify this option to keep your local mirror exactly synchronized. If you do not specify --delete, all files on the local mirror that are not on the remote mirrors anymore, will be kept, but they will not be used because the repodata does not include these. |
| repository parameter | description |
|---|---|
| fc | Synchronize all of the Fedora repository tree. Without the --devel, --source and --testing options, this defaults to the following repositories: core, core-sources, updates, updates-sources, extras, extras-sources, livna and livna-sources |
| fc-5 | Synchronize all of the Fedora repository tree for release 5. Without the --devel, --source and --testing options, this defaults to the following repositories: core, core-sources, updates, updates-sources, extras, extras-sources, livna and livna-sources. Substitute '5' for any valid release number of Fedora Core. |
| fc-5-i386 | Synchronize all of the Fedora repository tree for release 5, architecture i386. Without the --devel, --source and --testing options, this defaults to the following repositories: core, core-sources, updates, updates-sources, extras, extras-sources, livna and livna-sources. Substitute '5' for any valid release number of Fedora Core, or substitute 'i386' for any valid architecture. |
If you would want to sychronize all of the Fedora repository tree for release 5 and architecture i386, you would run:
./sync_repo fc-5-i386
This synchronizes the following repositories:
- core
- updates
- extras
- livna
If you'd also want the sources, run:
./sync_repo --source fc-5-i386
This synchronizes the same repositories, including:
- core-sources
- updates-sources
- extras-sources
- livna-sources
If you specify more then one option, the options become cumulative:
./sync_repo --source --testing fc-5-i386
This would sychronize all of the above, and:
- updates-testing
- updates-testing-source
- extras-testing
- extras-testing-source
- livna-testing
- livna-testing-source

