Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to re-sync database and s3 contents #21093

Open
mdavid01 opened this issue Oct 24, 2024 · 2 comments
Open

how to re-sync database and s3 contents #21093

mdavid01 opened this issue Oct 24, 2024 · 2 comments

Comments

@mdavid01
Copy link

Hi team: we believe our postgresql database artifact contents are out of sync with what's actually in the S3 bucket. our s3 bucket size is 143TB. From our user's standpoint, the Harbor UI, swagger, docker push/pull all functioning as expected. But there's no way we have 143TB of active projects/repos/artifacts.

  1. Is there a tool or method available that we can use to identify disconnects between the s3 content and the database content? if no tool or method, can you offer how you might go about finding the disconnects?
  2. Does the s3 bucket contain image scan results (if so, it could explain our growth)?
  3. What does the table 'Artifacts_trash' contain? Are they input to any harbor process or job?
  4. In the 'blob' table, we have ~6600 records with status 'delete'. What are those records? Are they input to any harbor process or job?

Thanks.

@Vad1mo
Copy link
Member

Vad1mo commented Oct 24, 2024

This is rather unusual, but I think that this might have happened, for example when the GC can delete the files.

  1. no such tool exist, IMO it has to be created so that it iterates over the Harbor (db) and S3 and finds layers and blobs and manifests not in Harbor but on S3.
  2. I am not sure, we had some functionality storing data in S3. but you would see it in the bucket, as its top-level next to docker
    ..

Did you run the GC, what is the outcome?

@mdavid01
Copy link
Author

mdavid01 commented Oct 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants