Mirroring is the process of copying the contents of an external repository locally, ensuring users have fast and reliable access to its packages. When you run a mirror, it populates your channel with packages from the mirror’s source. Anaconda recommends that channels contain only one mirror each to prevent conflicts between package sources.
For more information on channels, see Channels and subchannels.
Mirroring is restricted to users whose role provides write
or manage
permissions for Channel Mirrors and/or Subchannel Mirrors categories.
Allowlist the following URLs before attempting to mirror:
https://repo.anaconda.com/
https://repo.anaconda.cloud/
https://anaconda.org/
https://anaconda.com/
https://api.anaconda.cloud/
https://conda.anaconda.org/
https://pypi.org/
https://files.pythonhosted.org/
https://cran.r-project.org/
(optional - for CRAN R users)
Creating a mirror
When creating a mirror, the recommended workflow is:
-
Select a channel you want to contain your mirror.
-
Freeze your channel.
-
Open the Manage dropdown and select Create Mirror.
-
Complete the Create mirror form. Configuration options differ based on the type of mirror you are creating:
1Mirror Name
Enter a name for your mirror. Anaconda recommends you name your mirror something descriptive for your end users.
2Mirroring Mode
Choose whether you want your mirror to be active or passive.
Active Mirroring: Downloads packages from the source channel immediately to your local server.
Some repository channels require a large amount of storage (for example, Anaconda’s public repository is 700GB, conda-forge is 3TB, and PyPI is 10TB), and as a rule, the larger the mirror, the longer the wait time for it to complete.
Passive Mirroring: Creates a metadata file listing all packages on the mirrored server. Packages are downloaded when users request them via
conda install <PKG_NAME>
.Anaconda recommends establishing your mirrors as passive. Active mirrors take longer to complete than passive mirrors, but regardless of which mirroring mode you choose, the available packages are the same.
3External Source URL
Enter the URL of the conda channel to mirror.
Anaconda recommends creating mirrors for the following channels:
https://repo.anaconda.cloud/pkgs/main
https://repo.anaconda.cloud/pkgs/r
https://repo.anaconda.cloud/pkgs/msys2
If your external source channel is another Package Security Manager channel, you must use the format
https://<URL>/api/repo/<CHANNEL_NAME>
.If your external source channel is another Package Security Manager channel that contains CRAN R packages, you must use the format
https://<URL>/api/repo/<CHANNEL_NAME>/cran
.If your external source channel is a channel from Package Security Manager (Cloud), you must use the format
https://repo.anaconda.cloud/repo/t/<TOKEN>/<ORG_ID>/<CHANNEL_NAME>
.4Mirror Type
Select Conda as the mirror type. This ensures that only conda packages (
.conda
,.tar.bz2
) will be mirrored from the external source channel. Packages in the source channel that are not conda packages are not mirrored.5Mirroring Frequency
Set the frequency you want your mirror to run and update your packages. The default value instructs the mirror to update at midnight on the first day of every month.
Custom frequencies use cron expressions to determine when they run.
Mirroring large repositories can take several hours. Anaconda recommends against setting a frequency greater than Daily to avoid collisions between currently running and updating mirrors.
6Run Now
Select this checkbox to start your mirror when you click Save & Run. If the Run Now box is not checked, your changes are saved, and the mirror runs the next time its frequency configuration instructs it to do so.
7Assign Mirror Policy
Toggle between using the policy that is applied to the channel or selecting a policy to apply to the mirror. For more information about policies, see Policies.
You cannot apply a policy to a mirror if it is already applied to the channel.
Mirror policies override channel policies.
8View Applied Policy
View details of the policy applied to the mirror.
9Cancel/Save & Run
Select Cancel at any time to quit your mirror form completion and discard any set parameters. Select Save & Run to start your mirror.
1Mirror Name
Enter a name for your mirror. Anaconda recommends you name your mirror something descriptive for your end users.
2Mirroring Mode
Choose whether you want your mirror to be active or passive.
Active Mirroring: Downloads packages from the source channel immediately to your local server.
Some repository channels require a large amount of storage (for example, Anaconda’s public repository is 700GB, conda-forge is 3TB, and PyPI is 10TB), and as a rule, the larger the mirror, the longer the wait time for it to complete.
Passive Mirroring: Creates a metadata file listing all packages on the mirrored server. Packages are downloaded when users request them via
conda install <PKG_NAME>
.Anaconda recommends establishing your mirrors as passive. Active mirrors take longer to complete than passive mirrors, but regardless of which mirroring mode you choose, the available packages are the same.
3External Source URL
Enter the URL of the conda channel to mirror.
Anaconda recommends creating mirrors for the following channels:
https://repo.anaconda.cloud/pkgs/main
https://repo.anaconda.cloud/pkgs/r
https://repo.anaconda.cloud/pkgs/msys2
If your external source channel is another Package Security Manager channel, you must use the format
https://<URL>/api/repo/<CHANNEL_NAME>
.If your external source channel is another Package Security Manager channel that contains CRAN R packages, you must use the format
https://<URL>/api/repo/<CHANNEL_NAME>/cran
.If your external source channel is a channel from Package Security Manager (Cloud), you must use the format
https://repo.anaconda.cloud/repo/t/<TOKEN>/<ORG_ID>/<CHANNEL_NAME>
.4Mirror Type
Select Conda as the mirror type. This ensures that only conda packages (
.conda
,.tar.bz2
) will be mirrored from the external source channel. Packages in the source channel that are not conda packages are not mirrored.5Mirroring Frequency
Set the frequency you want your mirror to run and update your packages. The default value instructs the mirror to update at midnight on the first day of every month.
Custom frequencies use cron expressions to determine when they run.
Mirroring large repositories can take several hours. Anaconda recommends against setting a frequency greater than Daily to avoid collisions between currently running and updating mirrors.
6Run Now
Select this checkbox to start your mirror when you click Save & Run. If the Run Now box is not checked, your changes are saved, and the mirror runs the next time its frequency configuration instructs it to do so.
7Assign Mirror Policy
Toggle between using the policy that is applied to the channel or selecting a policy to apply to the mirror. For more information about policies, see Policies.
You cannot apply a policy to a mirror if it is already applied to the channel.
Mirror policies override channel policies.
8View Applied Policy
View details of the policy applied to the mirror.
9Cancel/Save & Run
Select Cancel at any time to quit your mirror form completion and discard any set parameters. Select Save & Run to start your mirror.
1Mirror Name
Enter a name for your mirror. Anaconda recommends you name your mirror something descriptive for your end users.
2Mirroring Mode
Choose whether you want your mirror to be active or passive.
Active Mirroring: Downloads packages from the source channel immediately to your local server.
Some repository channels require a large amount of storage (for example, Anaconda’s public repository is 700GB, conda-forge is 3TB, and PyPI is 10TB), and as a rule, the larger the mirror, the longer the wait time for it to complete.
Passive Mirroring: Creates a metadata file listing all packages on the mirrored server. Packages are downloaded when users request them via
conda install <PKG_NAME>
.Anaconda recommends establishing your mirrors as passive. Active mirrors take longer to complete than passive mirrors, but regardless of which mirroring mode you choose, the available packages are the same.
3External Source URL
Enter the URL of the Python package repository to mirror.
4Mirror Type
Select Std Python as the mirror type. This ensures that only Python packages (
.py
,.pyc
,.pyd
,.whl
,.egg
,.tar.gz
, for example) are mirrored from the source repository. Packages in the source channel that are not Python packages are not mirrored.5Mirroring Frequency
Set the frequency you want your mirror to run and update your packages. The default value instructs the mirror to update at midnight on the first day of every month.
Custom frequencies use cron expressions to determine when they run.
Mirroring large repositories can take several hours. Anaconda recommends against setting a frequency greater than Daily to avoid collisions between currently running and updating mirrors.
If you are mirroring the full PyPI repository, set your frequency to run once yearly. Once the PyPI mirror is complete, any attempts to re-run the mirror will cause issues. Consider using selective mirroring for specific packages instead of the full PyPI repository.
6Run Now
Select this checkbox to start your mirror when you click Save & Run. If the Run Now box is not checked, your changes are saved, and the mirror runs the next time its frequency configuration instructs it to do so.
7Mirroring Filters
Because policy filters only work for conda mirrors, Standard Python mirrors must use the Mirroring Filters section to specify which packages should be mirrored from the source channel.
8Exclude
List packages to exclude from the mirror by name here. You can also exclude packages by using wildcards. For example,
p*
excludes all packages that start with the letterp
.9Include
List exceptions to the exclusion list here. For example, if you want to include Python in your mirror, but you have used the exclusion filter
p*
to exclude all packages that start with the letterp
, you can include Python by addingpython
here.10View Channel Filters
View details of the Mirroring Filters applied to the channel.
11Cancel/Save & Run
Select Cancel at any time to quit your mirror form completion and discard any set parameters. Select Save & Run to start your mirror.
1Mirror Name
Enter a name for your mirror. Anaconda recommends you name your mirror something descriptive for your end users.
2Mirroring Mode
Choose whether you want your mirror to be active or passive.
Active Mirroring: Downloads packages from the source channel immediately to your local server.
Some repository channels require a large amount of storage (for example, Anaconda’s public repository is 700GB, conda-forge is 3TB, and PyPI is 10TB), and as a rule, the larger the mirror, the longer the wait time for it to complete.
Passive Mirroring: Creates a metadata file listing all packages on the mirrored server. Packages are downloaded when users request them via
conda install <PKG_NAME>
.Anaconda recommends establishing your mirrors as passive. Active mirrors take longer to complete than passive mirrors, but regardless of which mirroring mode you choose, the available packages are the same.
3External Source URL
Enter the URL of the R package repository to mirror.
4Mirror Type
Select “Std R” as the mirror type. This ensures that only R packages (
.R
,.RData
,.rda
,.RDS
,.Rd
,.Rproj
, for example) are mirrored from the source repository. Packages in the source channel that are not R packages are not mirrored.5Mirroring Frequency
Set the frequency you want your mirror to run and update your packages. The default value instructs the mirror to update at midnight on the first day of every month.
Custom frequencies use cron expressions to determine when mirrors run.
Mirroring large repositories can take several hours. Anaconda recommends against setting a frequency greater than Daily to avoid collisions between currently running and updating mirrors.
6Run Now
Select this checkbox to start your mirror when you click Save & Run. If the Run Now box is not checked, your changes are saved, and the mirror runs the next time its frequency configuration instructs it to do so.
7Mirroring Filters
Because policy filters only work for conda mirrors, Standard R mirrors must use the Mirroring Filters to specify which packages should be mirrored from the source channel.
8Exclude
List packages to exclude from the mirror by name here. You can also exclude packages by using wildcards. For example,
p*
excludes all packages that start with the charactersp
.R packages can also be excluded by License type.
9Include
List exceptions to the exclusion list here. For example, if you want to include the
plumber
package in your mirror, but you have used the exclusion filterp*
to exclude all packages that start with the charactersp
, you can include plumber by addingplumber
here.10View Channel Filters
View details of the Mirroring Filters applied to the channel.
11Cancel/Save & Run
Select Cancel at any time to quit your mirror form completion and discard any set parameters. Select Save & Run to start your mirror.
-
Allow the mirror time to complete.
-
Unfreeze your channel.
For more information on freezing and unfreezing a channel, see Freezing/Unfreezing Channels.
Managing mirrors
Select All Mirrors from the left-hand navigation to view mirrors globally for all users.
This view is only available to users whose role provides Manage
permissions for the mirror attribute. This value must be assigned in Keycloak.
Use the search box to locate a mirror by name. Click a column header to sort mirrors by Type, Mode, Mirroring Status, or Last Updated.
Mirror actions
Use the icons in the Actions column to manage your mirrors:
Mirror actions can also be performed from a channel’s Mirrors tab.
Edit mirror
Edit a mirror’s configurations.
You cannot edit the mode of an established mirror.
Stop running mirror
Stop an in-progress mirror.
It can take up to 10 minutes for a mirror to fully stop. A mirror in the process of stopping will display Stopping as its mirroring status. Once it is complete, it will display Stopped as its status. Stopping a mirror does not discard the progress the mirror has made, and some packages may appear in your channel’s Packages tab.
Restart Mirror
Restart a stopped mirror.
Restarted mirrors run from the beginning of the mirroring process, not from where you stopped the run.
See details
View information about how many packages were filtered from the source, reasons for their exclusion, and whether packages were mirrored passively or actively.
Delete mirror
Delete a mirror.
Download Dependency Report
Download a dependency report (if available).
A dependency report is a detailed list of all the software packages required for your specified packages to function correctly. It includes both direct dependencies (packages your specified packages require to run) and indirect dependencies (packages the dependencies require to run). A package dependency report can help you identify exactly which packages are necessary for your channel to be able to create a working environment using conda.
Dependency reports are only available for mirrors that have policies with specific configurations applied:
- You must set package rules to allow packages by their names using MatchSpec protocol—a syntax for specifying package names and versions in conda
- You must select the Include dependencies checkbox.