Skip to content

Add rake gitlab:git:checksum_projects

Michael Kozono requested to merge mk/add-repo-checksum-task into master

What does this MR do?

Adds rake gitlab:git:checksum_projects. A customer used something like this to verify Geo's repository replication.

Further info

One Git repository can be compared to another by checksumming all refs of each repository. If both repositories have the same refs, and if both repositories pass an integrity check, then we can be confident that both repositories are the same.

For example, this can be used to compare a backup of a repository against the source repository.

Examples

For all projects, where:

  • Project with ID#2 doesn't exist
  • Project with ID#4 does not have a repository
  • Project with ID#5 has an empty repository
$ bin/rake gitlab:git:checksum_projects
1,cfa3f06ba235c13df0bb28e079bcea62c5848af2
3,3f3fb58a8106230e3a6c6b48adc2712fb3b6ef87
4,
5,0000000000000000000000000000000000000000
6,6c6b48adc2712fb3b6ef87cfa3f06ba235c13df0

For specific projects, where:

  • Project with ID#2 doesn't exist
  • Project with ID#4 does not have a repository
  • Project with ID#5 has an empty repository
$ CHECKSUM_PROJECT_IDS="1,2,3,4,5" bin/rake gitlab:git:checksum_projects
1,cfa3f06ba235c13df0bb28e079bcea62c5848af2
3,3f3fb58a8106230e3a6c6b48adc2712fb3b6ef87
4,
5,0000000000000000000000000000000000000000

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Closes #297548 (closed)

Edited by Fabian Zimmer

Merge request reports

Loading