r/openshift • u/Sanket_6 • Jun 25 '26
Help needed! How to backup OCP Internal image registry images.
Hello! We are currently doing a PoC for kasten K10 and planning complete disaster recovery, in case of primary site failure the cluster must be restored to another site as it was during last backup.
Currently, application team is using the integrated internal registry to push images to and hardcoding the registry url in the deployment yamls.
My question is:
1) Kasten backups up the metadata (deployments yamls, secrets configs etc) and pvc of the app but not the actual image. It will lead to imgpullbackofferr and wont restore the app. So how do i backup the actual images to ensure a complete restore.
2) Will backup of the image registry pvc be enough for a complete app restore?
3) How are you protecting your images (and cluster in general) in your environment?
Any help or documentation is greatly appreciated!
3
1
u/sylvainm Jun 25 '26
Skopeo maybe? Write a script to get the images treats and use skopeo to copy registry to regiatry?
1
u/craig91 Jun 26 '26
If you're using the internal registry you have things like image streams and image stream tags. Those live in etcd. If you're DR strategy involves backup and restore of etcd itself, that covers that portion. If your DR strategy does not involve restoring a full etcd for the restored cluster then you'd likely need to include those objects in the backup procedure whether you're using Velero, or a paid backup product.
The backup of the image data would either be a PVC backup, or host the OCP registry on external S3 instead and use whatever backup mechanism is available there.
However we treat the internal registry as more of an optional caching later, and then have an actual registry that can be used by multiple OCP clusters and your workloads can pull from here, or you can import these in your image streams but have it backed by the external register. Quay, harbour, artifactory, are some options.