Ask questionsBackup snapshotting of Sourcegraph instance might corrupt .git dirs

  • 3.12.6 <!-- the version of Sourcegraph or "" -->
  • AWS linux intel EC2: docker-compose

Steps to reproduce:

  1. Follow to create a sourcegraph instance
  2. Add one repo to it
  3. Create a snapshot of the volume:
  4. Create a second EC2 instance and for the volume choose to use the snapshot just created

Observe the repo .git directory in inconsistent state (if you're lucky and it reproduced)



This doesn't seem to be AWS or docker-compose specific. Any snapshotting that happens while a git operation is in flight could potentially trigger this.


Answer questions slimsag

As for how this is failing, we can probably file another issue about making it fail nicely. For example if we set GIT_DIR then git won't do the discovery all the way up to /data and instead will fail with a better error message. Additionally we could look into making our janitor job more aggressively detect bad .git dirs. WDYT?



Related questions

Add loki to hot 1
Unable to clone GitLab repositories with self signed certificate hot 1
Github User Rank List