1

We have disaster recovery plans that mean we take a backup of our git installation (Atlassian Stash in our case) and restore it on a test server to verify the backup was a good one. If the restore process fails then we have a problem but we're wondering about going a bit further when the restore is a success and verifying the restored repositories.

Would using git fsck be a good idea here? Running it locally as a developer throws some dangling or unreachable objects, I believe this is a normal thing that happens. But on a fresh git clone there shouldn't be any issues right? So if fsck had errors then we're having a bad time?

As a second option we could also point our CI server at a restored repository and have it build and run tests. As our main branch should always be healthy then any build failures would indicate an issue.

Any other ideas on verifying a repository is good and healthy?

Gog

GogLlundain
  • 552
  • 4
  • 9

1 Answers1

0
  1. You can use the commands in this SO question to verify you local and remote are same. Just iterate through each branch and check that they are the same

  2. In case your backup is just backing up the bare repository , you can do a unix diff command to verify that your backup is good

Community
  • 1
  • 1
Biswajit_86
  • 3,661
  • 2
  • 22
  • 36