harbor-helm icon indicating copy to clipboard operation
harbor-helm copied to clipboard

How Registry Image Backup - Harbor (v2.4.x) / Harbor Helm (1.8.0)

Open namgonkim opened this issue 2 years ago • 2 comments

hi

Currently, Harbor (v2.4.x) / Harbor Helm (1.8.0) deployed to k8s as Harbor Helm, and chartmuseum, registry, database, redis, trivy, and job-service are using nfs as pv and pvc. thank you. :) (rook-ceph is also under consideration)

However, in case of an emergency, I searched for a periodic backup of the harbor, but there was no document about the backup in the situation of distribution with Helm, so I asked a question.

No matter how much I looked at the issues and discussions of the harbor, harbor-helm git repository, there was no clear answer.

Metadata stored in the database can be processed using db export backup, but I am curious how to back up the artifacts (images) stored in the registry.

Can you provide a guide for backing up the image layers in the registry container of harbour, deployed by k8s with harbour helm, without using a third party (velero, minio)?

Here's what I was thinking of:

  1. Connect to any Docker registry using replication and periodically back up images there.
  • If I load a backup image in this way, the image digest value will be different, so it is likely to conflict with the metadata stored in the database.
  1. Connect to the registry container of the deployed harbor, bind the /storage directory with tar and send it to the outside.
  • I tried the method, but it fails because there is no root, and the scp command that can be transmitted to the outside cannot be performed.

Thank you for reading this long post, and thank you for your reply.

namgonkim avatar Apr 28 '22 04:04 namgonkim

Thanks for bringing this up! We are actively investigating backup harbor with Velero. More ideas/suggestion are very welcome!

zyyw avatar May 05 '22 07:05 zyyw

Is there any way to back up the harbor deployed with helm itself without using a third party tool like Velero? Please guide. thank you.

namgonkim avatar May 10 '22 02:05 namgonkim

I'm curious about an answer to this question too; could this be achieved with a tool like skopeo or crane? Maybe with a script that also queries the REST API to get a full list of all images?

djpbessems avatar Jun 09 '23 07:06 djpbessems

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Feb 08 '24 09:02 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

github-actions[bot] avatar Mar 11 '24 09:03 github-actions[bot]