You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support multiple repositories in oras backup and restore #730
Ability to download and upload one or more resources to and from disk.
In air gapped environments, this may be the only way replicate a registry. The data would be saved to say a thumb drive which is physically moved into the air gapped environment and uploaded to a private registry.
Sometimes it may be more convenient to dump all the data onto a local file and upload later rather than use the copy command.
Why is this needed for ORAS?
In order to mirror registries, we need the ability to download one or more resources from a registry to disk. We also need the ability to upload the data saved on disk to a registry.
Manual backup and restore of registries
Mirroring registries to for air gapped environments
Mirroring registries for performance reasons
Convenient way to promote artifacts from dev to staging to prod
The destination of the data could be a directory (containing directories and files), a tgz file or a stream of tgz data. I think the gzip compressed tar file (tgz) would be the most convenient.
The ability to to specify multiple resources to copy to a single disk output is needed.
Need to be able to specify credentials for source or destination registry similar to ~/.docker/config.json
Need to be able to specify TLS cert for source or destination registry.
Obviously needs to be optimized not to contain the same blob more than once.
Given a list of image:tags, the new uploaded registry images should have the same shasums
Are you willing to submit PRs to contribute to this feature?
Thanks for the feature request. It looks like the OCI image layout #378 can cover the core ability to upload the data saved on disk to a registry as you described above.
ORAS supported specifying an authentication file when pulling/pushing files from/to the registry. Can you elaborate more on "Need to be able to specify credentials and TLS for source or destination registry"? Does it mean the ability to use certificates at path (.crt, .cert, .key) to connect to the destination registry and require HTTPS and verify certificates when interacting with the registry respectively?
With oras v1.0.0-rc.1, this feature request is fulfilled by using oras copy --to-oci-layout and oras copy --from-oci-layout where OCI layout supports multiple resources in a single folder.
With oras v1.0.0-rc.1, this feature request is fulfilled by using oras copy --to-oci-layout and oras copy --from-oci-layout where OCI layout supports multiple resources in a single folder.
oras copy only copies one resource and it does not preserve repository name. If I want to create a mirror, particularly in air gapped environment, I want to download a long list of images and then sneaker net them to my air gapped environment and upload them to my private registry.
The repository name can be preserved if you use the registry full FQDN as the layout path, e.g. below command will download the image to an OCI layout in ${pwd}/docker.io/library/hello-world.
The repository is in the relative path from docker.io to the oci root directory hello-world
The idea of batched uploading/downloading sounds interesting to me. Providing batched operations is a brand-new feature to oras CLI so it's better to start with a design discussion.
Sure, everyone could write their own shell script, but there are a lot of use cases for this. I'd much rather throw a tar ball in a bucket and tell a customer to oras import it and know it will work.
Hi @TerryHowe , can we revisit this issue and see what's the remaining gap with your initial expectation listed above? Then we could see which one should be planned in v1.4.0-alpha release. Thanks.
changed the title [-]Add ability to download/upload one or more resources to/from disk[/-][+]Support multiple repositories in oras backup and restore[/+]on Oct 22, 2026
Removed the duplicate label and retitled this issue to match its remaining scope. oras backup/oras restore already handle multiple tags of a single repository; what's left is backing up and restoring multiple repositories in one archive, like tar (confirmed in the comments above). Related: #2018 (oras pull --output-archive).
Activity
FeynmanZhou commentedon Dec 22, 2022
Hi @TerryHowe ,
Thanks for the feature request. It looks like the OCI image layout #378 can cover the core ability to upload the data saved on disk to a registry as you described above.
ORAS supported specifying an authentication file when pulling/pushing files from/to the registry. Can you elaborate more on "Need to be able to specify credentials and TLS for source or destination registry"? Does it mean the ability to use certificates at path (.crt, .cert, .key) to connect to the destination registry and require HTTPS and verify certificates when interacting with the registry respectively?
TerryHowe commentedon Jan 10, 2023
Credentials I would expect similar to the docker config.json format.
TerryHowe commentedon Jan 10, 2023
I don't have any firm TLS cert requirements because there are a lot of options there, but need to support self signed certs and private CAs.
qweeah commentedon Jan 11, 2023
oras reuses the same credential schema of docker config.json file
--ca-filedo support private CAs, and you can add self-signed cert to the CA file so self-singed certs are also supported.shizhMSFT commentedon Feb 8, 2023
With
oras v1.0.0-rc.1, this feature request is fulfilled by usingoras copy --to-oci-layoutandoras copy --from-oci-layoutwhere OCI layout supports multiple resources in a single folder.TerryHowe commentedon Feb 8, 2023
oras copyonly copies one resource and it does not preserve repository name. If I want to create a mirror, particularly in air gapped environment, I want to download a long list of images and then sneaker net them to my air gapped environment and upload them to my private registry.qweeah commentedon Feb 9, 2023
The repository name can be preserved if you use the registry full FQDN as the layout path, e.g. below command will download the image to an OCI layout in
${pwd}/docker.io/library/hello-world.The repository is in the relative path from
docker.ioto the oci root directoryhello-worldThe idea of batched uploading/downloading sounds interesting to me. Providing batched operations is a brand-new feature to oras CLI so it's better to start with a design discussion.
shizhMSFT commentedon Feb 10, 2023
@TerryHowe Downloading multiple resources to local filesystem is as simple as saving the following bash script as
oras_mirror_backup.shand then do
As you may noticed, the blobs are not de-duplicated across the repositories. Here's an advanced script
If you run the above script, you will get
Here's the final folder structure:
/cc @sajayantony @qweeah
TerryHowe commentedon Feb 10, 2023
I was going to add optimization to this as a follow-up, just trying to keep it simple for now. This is supposed to be a POC.
TerryHowe commentedon Feb 11, 2023
Sure, everyone could write their own shell script, but there are a lot of use cases for this. I'd much rather throw a tar ball in a bucket and tell a customer to
oras importit and know it will work.github-actions commentedon Jul 23, 2023
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
13 remaining items
Wwwsylvia commentedon Aug 5, 2025
Closed via #1790 and #1792
FeynmanZhou commentedon Aug 13, 2025
Hi @TerryHowe , can we revisit this issue and see what's the remaining gap with your initial expectation listed above? Then we could see which one should be planned in v1.4.0-alpha release. Thanks.
TerryHowe commentedon Aug 13, 2025
This was always about the ability to back up multiple resources. The current implementation backs up multiple versions of one resource.
It should work like tar.
FeynmanZhou commentedon Aug 20, 2025
Just confirmed with @TerryHowe that this request is to support multi-repo in oras backup and restore
[-]Add ability to download/upload one or more resources to/from disk[/-][+]Support multiple repositories in oras backup and restore[/+]TerryHowe commentedon Oct 22, 2026
Removed the
duplicatelabel and retitled this issue to match its remaining scope.oras backup/oras restorealready handle multiple tags of a single repository; what's left is backing up and restoring multiple repositories in one archive, like tar (confirmed in the comments above). Related: #2018 (oras pull --output-archive).TerryHowe commentedon Nov 29, 2026
Closing in favor of narrower issues that cover what's left here:
oras backupaccepts multiple repositories in one backupdocs/proposals/backup-restore-multi.md, from docs: add multi-repository backup and restore proposal #1917), extended to multiple registriesAlready done: full references in
ref.name(#1904) and multi-repository restore (#2364, #2405).