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

:_mod-docs-content-type: PROCEDURE
[id="oc-mirror-disk-to-mirror_{context}"]
= Mirroring from disk to mirror

[role="_abstract"]
To mirror the contents of a generated image set to a target mirror registry, use the `oc-mirror` plugin. This action ensures that the required images are successfully transferred to your target environment

.Prerequisites

* You have installed the {oc-first} in the disconnected environment.
* You have installed the oc-mirror CLI plugin in the disconnected environment.
* You have generated the image set file by using the `oc mirror` command.
* You have transferred the image set file to the disconnected environment.

.Procedure

* Run the `oc mirror` command to process the image set file on disk and mirror the contents to a target mirror registry:
+
[source,terminal]
----
$ oc mirror --from=./mirror_seq1_000000.tar \
  docker://registry.example:5000  --v1
----
+
where:
+
`--from=`:: Specifies passing in the image set .tar file to mirror, named `mirror_seq1_000000.tar` in this example. If an `archiveSize` value was specified in the image set configuration file, the image set might be broken up into multiple .tar files. In this situation, you can pass in a directory that contains the image set .tar files.
`docker`:: Specifies the registry to mirror the image set file to. The registry must start with `docker://`. If you specify a top-level namespace for the mirror registry, you must also use this same namespace on subsequent executions.
+
This command updates the mirror registry with the image set and generates the `ImageContentSourcePolicy` and `CatalogSource` resources.

.Verification

. Navigate into the `oc-mirror-workspace/` directory that was generated.

. Navigate into the results directory, for example, `results-1639608409/`.

. Verify that YAML files are present for the `ImageContentSourcePolicy` and `CatalogSource` resources.

.Next steps

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

.Troubleshooting

* link:https://access.redhat.com/solutions/7032017[Unable to retrieve source image].

