> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# anaconda repo mirror

export const GCell = ({children, className}) => <div className={`grid-table-cell ${className || ""}`} role="cell">
    {children}
  </div>;

export const GTH = ({children, className}) => <div className={`grid-table-th ${className || ""}`} role="columnheader">
    {children}
  </div>;

export const GRow = ({children}) => <div className="grid-table-row" role="row">{children}</div>;

export const GBody = ({children}) => <div className="grid-table-body" role="rowgroup">{children}</div>;

export const GHead = ({children}) => <div className="grid-table-head" role="rowgroup">{children}</div>;

export const GTable = ({children, className, cols}) => <div className={`grid-table not-prose overflow-hidden rounded-2xl ${className || ""}`} style={{
  "--grid-table-cols": cols
}} role="table">
    {children}
  </div>;

## Usage

```bash theme={null}
anaconda repo mirror [OPTIONS]
```

## Description

Manages Anaconda repository mirrors. You can create, update, delete, stop, or restart a mirror. You can also list mirrors, show mirror properties, and check the sync state of a mirror. A mirror copies packages from a source channel into one of your channels. You can configure the mirror mode (`passive` or `active`), the mirror type (`conda`, `python_simple`, or `CRAN`), and an optional cron schedule and proxy.

## Options

<GTable cols="25% 25% 50%">
  <GHead>
    <GRow>
      <GTH>Option</GTH>
      <GTH>Default</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`-c, --channel <CHANNEL>`</GCell>

      <GCell />

      <GCell>Channel to mirror to</GCell>
    </GRow>

    <GRow>
      <GCell>`--create <NAME>`</GCell>

      <GCell />

      <GCell>Create a new mirror</GCell>
    </GRow>

    <GRow>
      <GCell>`--update <NAME>`</GCell>

      <GCell />

      <GCell>Update an existing mirror</GCell>
    </GRow>

    <GRow>
      <GCell>`--delete <NAME>`</GCell>

      <GCell />

      <GCell>Delete a mirror</GCell>
    </GRow>

    <GRow>
      <GCell>`--stop <NAME>`</GCell>

      <GCell />

      <GCell>Stop a mirror</GCell>
    </GRow>

    <GRow>
      <GCell>`--restart <NAME>`</GCell>

      <GCell />

      <GCell>Restart a mirror</GCell>
    </GRow>

    <GRow>
      <GCell>`--list, -l`</GCell>

      <GCell />

      <GCell>List all mirrors</GCell>
    </GRow>

    <GRow>
      <GCell>`--show <NAME> [PROP ...]`</GCell>

      <GCell />

      <GCell>Show mirror properties: `id`, `name`, `source`, `type`, `mode`, `state`, `proxy`, `cron`, `last_run_at`, `created_at`, `updated_at`</GCell>
    </GRow>

    <GRow>
      <GCell>`--list-all`</GCell>

      <GCell />

      <GCell>List all mirrors</GCell>
    </GRow>

    <GRow>
      <GCell>`--sync-state <NAME>`</GCell>

      <GCell />

      <GCell>Show sync state of a mirror by name</GCell>
    </GRow>

    <GRow>
      <GCell>`-s, --source <URL>`</GCell>

      <GCell />

      <GCell>Source channel URL (for example, `https://conda.anaconda.org/conda-test`)</GCell>
    </GRow>

    <GRow>
      <GCell>`-n, --name <NAME>`</GCell>

      <GCell />

      <GCell>Mirror name</GCell>
    </GRow>

    <GRow>
      <GCell>`--mode <MODE>`</GCell>
      <GCell>`passive`</GCell>
      <GCell>Mirror mode: `passive` (files on demand) or `active` (download all)</GCell>
    </GRow>

    <GRow>
      <GCell>`--type <TYPE>`</GCell>

      <GCell />

      <GCell>Mirror type: `conda`, `python_simple`, or `CRAN`</GCell>
    </GRow>

    <GRow>
      <GCell>`--cron <CRON>`</GCell>

      <GCell />

      <GCell>Cron string for mirror job schedule</GCell>
    </GRow>

    <GRow>
      <GCell>`--proxy <URL>`</GCell>

      <GCell />

      <GCell>Proxy URL for mirroring</GCell>
    </GRow>

    <GRow>
      <GCell>`--policy-id <ID>`</GCell>

      <GCell />

      <GCell>Policy ID to apply to the mirror</GCell>
    </GRow>

    <GRow>
      <GCell>`--use-channel-policy <BOOL>`</GCell>

      <GCell />

      <GCell>Set to `True` to apply the policy connected to the channel. When `False`, provide `--policy-id`.</GCell>
    </GRow>

    <GRow>
      <GCell>`--run_now`</GCell>

      <GCell />

      <GCell>Run the mirror job immediately instead of waiting for the cron schedule</GCell>
    </GRow>

    <GRow>
      <GCell>`-h, --help`</GCell>

      <GCell />

      <GCell>Show full help including filter options</GCell>
    </GRow>
  </GBody>
</GTable>

## Filter options

Filters narrow the set of packages mirrored from the source channel. Some filters are specific to an artifact family.

<GTable cols="25% 25% 50%">
  <GHead>
    <GRow>
      <GTH>Option</GTH>
      <GTH>Default</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`--subdirs <LIST>`</GCell>

      <GCell />

      <GCell>\[conda] Comma-separated conda subdirs to mirror (for example, `linux-64,osx-64,noarch`)</GCell>
    </GRow>

    <GRow>
      <GCell>`--projects <LIST>`</GCell>

      <GCell />

      <GCell>\[python] Comma-separated PyPI projects to mirror</GCell>
    </GRow>

    <GRow>
      <GCell>`--licenses <LIST>`</GCell>

      <GCell />

      <GCell>Comma-separated licenses to include. Prepend `-` to exclude (for example, `mit,bsd,-gpl3`). Values: `agpl`, `gpl2`, `gpl3`, `lgpl`, `bsd`, `mit`, `apache`, `psf`, `public_domain`, `proprietary`, `other`, `none`</GCell>
    </GRow>

    <GRow>
      <GCell>`--only_spec <SPEC>`</GCell>

      <GCell />

      <GCell>MatchSpec to include exclusively. Can be repeated for multiple entries.</GCell>
    </GRow>

    <GRow>
      <GCell>`--exclude_spec <SPEC>`</GCell>

      <GCell />

      <GCell>MatchSpec to exclude. Can be repeated for multiple entries.</GCell>
    </GRow>

    <GRow>
      <GCell>`--include_spec <SPEC>`</GCell>

      <GCell />

      <GCell>MatchSpec to include. Can be repeated for multiple entries.</GCell>
    </GRow>

    <GRow>
      <GCell>`--cve_score <SCORE>`</GCell>

      <GCell />

      <GCell>Only mirror files with CVE score less than or equal to this value (for example, `9.5`)</GCell>
    </GRow>

    <GRow>
      <GCell>`--exclude_uncurated_cve_packages`</GCell>

      <GCell />

      <GCell>Exclude packages with uncurated CVEs from mirroring</GCell>
    </GRow>

    <GRow>
      <GCell>`--only_signed [BOOL]`</GCell>
      <GCell>`False`</GCell>
      <GCell>Only mirror signed packages</GCell>
    </GRow>

    <GRow>
      <GCell>`--date_from <DATE>`</GCell>

      <GCell />

      <GCell>\[conda] Only mirror packages published on or after this date (YYYY-mm-dd)</GCell>
    </GRow>

    <GRow>
      <GCell>`--date_to <DATE>`</GCell>

      <GCell />

      <GCell>\[conda] Only mirror packages published on or before this date (YYYY-mm-dd)</GCell>
    </GRow>
  </GBody>
</GTable>

## Examples

**List mirrors**

```bash theme={null}
anaconda repo mirror --list
```

**Create a passive conda mirror**

```bash theme={null}
anaconda repo mirror --channel my-channel --create my-mirror --source https://repo.example.com/example-source-channel
```

**Show mirror properties**

```bash theme={null}
anaconda repo mirror --show my-mirror
```
