FAQ:Mirror Standalone Conary Repositories
From rPath Wiki
| FAQ | ||
| Question: What actions are required to mirror a standalone Conary repository? | ||
Answer: Use these instructions to mirror one Conary standalone repository to another. To back up an rBuilder Online repository, use rBO repository mirroring instructions as an extension for these instructions. For mirroring software appliances, see documentation for rMirror.
Create the necessary Conary user accounts to read and write the labels you wish to mirror. (Use web interface for your standalone repository to create users and assign permissions.) Create a user for the source repository that has read permissions for the labels, and create a user for the target repository with write permissions for all labels.
Ensure that the serverName value in the target repository configuration includes the host portion of the label you wish to mirror.
For the remaining instructions, suppose source_user and target_user are the names of the users on the source and target systems. Also, suppose conary.example.com and conary-mirror.example.com are the hostnames of the source and target. So, you are mirroring from http://conary.example.com/conary/ to http://conary-mirror.example.com/conary/.
Create a configuration file, such as mirror.conf, on the target system that identifies what repository, labels, and troves to mirror on the target.
host conary.example.com [source] user conary.example.com source_user $source_user_password [target] user conary.example.com target_user $target_user_password repositoryMap conary.example.com https://conary-mirror.example.com/conary/
If you wish to specify a label to mirror rather than every branch of the repository, use the labels directive. For the example, designate the label rpl:1 using the line labels conary.example.com@rpl:1 in the file. List multiple labels on the same line separated by spaces.
In the rare occasion you wish to specify a set of troves, use the matchTroves directive with a regular expression representing the troves (such as in matchTroves vim.*). This requires you to use a single regular expression to specify all the desired troves.
Run the Conary mirror script on the target system specifying the new configuration file. The command for the example would be:
/usr/share/conary/mirror -v --config-file mirror.conf
Use the --help option to see the documented usage message for the mirror script.
