// Module included in the following assemblies:
//
// * installing/disconnected_install/about-installing-oc-mirror-v2.adoc
// * updating/updating_a_cluster/updating_disconnected_cluster/mirroring-image-repository.adoc

:_mod-docs-content-type: CONCEPT
[id="installation-oc-mirror-v2-about_{context}"]
= About oc-mirror plugin v2

The oc-mirror OpenShift CLI (`oc`) plugin is a single tool that mirrors all required {product-title} content and other images to your mirror registry.

To use the new version of oc-mirror, add the `--v2` flag to the oc-mirror plugin v2 command line.

oc-mirror plugin v2 has the following features:

* Provides a centralized method to mirror {product-title} releases, Operators, helm charts, and other images.


* Verifies that the complete image set specified in the image set configuration file is mirrored to the mirrored registry, regardless of whether the images were previously mirrored or not.

* Uses a cache system instead of metadata, which prevents the need to start the mirroring process over in the case of a failure for a single step of the process.
// Does the cache about refer to the cache of files mentioned in Luigi's demo of the delete feature, where he says that the plugin uses a local cache to cache images in case of a failure? If so, I can expand this bullet point to explicitly talk about how the cache keeps images around in case of failure, preventing the need to start over.

* Maintains minimal archive sizes by incorporating only new images into the archive.

* Generates mirroring archives with content selected by mirroring date.

* Can generate `ImageDigestMirrorSet` (IDMS) and `ImageTagMirrorSet` (ITMS) resources, which cover the full image set, instead of an `ImageContentSourcePolicy` (ICSP) resource, which only covered incremental changes to the image set for each mirroring operation with v1.

* Does not perform automatic pruning. v2 now uses a `Delete` feature, which grants users more control over deleting images.

* Introduces support for `registries.conf` files. This change facilitates mirroring to multiple enclaves while using the same cache.

[id="oc-mirror-v2-workflow_{context}"]
== High level workflow

The following steps outline the high-level workflow on how to use the oc-mirror plugin v2 to mirror images to a mirror registry:

. Create an image set configuration file.

. Mirror the image set to the target mirror registry by using one of the following workflows:

* Mirror an image set directly to the target mirror registry (mirror to mirror).

* Mirror an image set to disk (mirror to disk), transfer the `tar` file to the target environment, then mirror the image set to the target mirror registry (disk to mirror).

. Configure your cluster to use the resources generated by the oc-mirror plugin v2.

. Repeat these steps to update your target mirror registry as necessary.