// Module included in the following assemblies:
//
// * installing/disconnected_install/installing-mirroring-disconnected-v2.adoc

:_mod-docs-content-type: PROCEDURE
[id="oc-mirror-workflows-partially-disconnected-v2_{context}"]
= Mirroring an image set in a partially disconnected environment

You can mirror image sets to a registry using the oc-mirror plugin v2 in environments with restricted internet access. During the mirroring process, the plugin automatically generates the `ImageSetConfiguration` and `DeleteImageSetConfiguration` files that are pinned by digest in your working directory, along with your original files that reference tags. Pinning by digest maintains consistency across your disconnected environments ensuring that you always deploy the same image, regardless of any later changes to the upstream tags.

.Prerequisites

* You have access to the internet and the mirror registry in the environment where you are running the oc-mirror plugin v2.

.Procedure

* Mirror the images from the specified image set configuration to a specified registry by running the following command:
+
[source,terminal]
----
$ oc mirror -c <image_set_configuration> --workspace file://<file_path> docker://<mirror_registry_url> --v2 <1>
----
+
where:

<image_set_configuration>:: Specifies the name of the image set configuration file.
<file_path>:: Specifies the directory where cluster resources will be generated in.
<mirror_registry_url>:: Specifies the URL or address of the mirror registry where the images are stored and from which they need to be deleted.

.Verification

. Navigate to the `working-dir/cluster-resources` directory that was generated in the `<file_path>` directory.
// Can the step above be reworded to "Navigate to the `working-dir/cluster-resources` directory that was generated in the `<file_path>` directory"?
. Verify that the YAML files are present for the `ImageDigestMirrorSet`, `ImageTagMirrorSet`, and `CatalogSource` resources.


.Next steps

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