harbor icon indicating copy to clipboard operation
harbor copied to clipboard

How to force re-upload harbor existing layers? Harbor Image Layer Re-upload Mechanism: Forced Updates for Data Recovery

Open will-mei opened this issue 9 months ago • 2 comments

Background: Our Harbor service utilizes a Ceph cluster acting as S3 storage. Unfortunately, an unexpected data center shutdown due to AC malfunctions caused overheating and data loss on some hard drives.

Current Situation: We've successfully restored the object storage and service functionality. However, data recovery for lost objects is not possible. As a result, we need to re-upload existing images.

The Challenge: During image re-uploading, some image layers fail to update and are recognized as already existing. Is there a way to force Harbor to re-upload all layers of existing images?

will-mei avatar May 14 '24 07:05 will-mei

Hi @will-mei , What the lost is objects in S3 storage while data in postgres is not affected? Correct Me if I understood wrong

MinerYang avatar May 14 '24 07:05 MinerYang

@MinerYang

Hi @will-mei , What the lost is objects in S3 storage while data in postgres is not affected? Correct Me if I understood wrong

Right, PostgreSQL is healthy and fine. However, the objects stored on S3 are corrupted, and the consistency of the sharded data has been compromised. The sharded data of objects is no longer functioning as intended (it seemed that they are now empty blobs).

will-mei avatar May 14 '24 08:05 will-mei

Hi @will-mei ,

I would like to suggest you following steps to re-pushing images while some of the objects missing in S3 filesystem

  • Step 1 Run GC to clean the unused blobs from storage and registry redis cache
  • Step 2 re-push images to harbor

MinerYang avatar May 20 '24 09:05 MinerYang

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 Jul 20 '24 09:07 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 Aug 19 '24 09:08 github-actions[bot]