Require to find all empty repos

Dani Rubin May 24, 2024

Hi I have recently done a migration to Bitbucket (Data Centre) version. 

Problem is we are finding arbitrary empty repos.

I am looking for a way to isolate those repos that are empty and recopy them over.

In particular looking for a list of repos that have zero commits or size = 0.

I tried looking at the Postgres database, but those tables are not very user intuitive.

Any assistance in this regard will be appreciated.

 

Dani

 

 

1 answer

2 votes
Aman Shrivastava
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 25, 2024

Hi Dani,

Repositories are originally stored on the file system and the database only keeps track of a repository's size when a specific job is executed by Bitbucket for that repository. As a result, the size of each repo may not be present in the database.

Having said that, we have a KB article on How to find the size of a repository hosted on Bitbucket Server and Datacenter that consists of an SQL query to determine the size of the repositories.

Regards,
Aman

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events