Troubleshooting

Simulate SCM Backup’s Git usage

If something goes wrong in the moment when SCM Backup is actually trying to backup your repos, you can manually do the same steps to verify if they work directly in Git.

(if they don’t, the problem may be caused by an issue with your local Git installation)

SCM Backup does this:

  1. If the local repo doesn’t exist yet, create an empty one:

    git init --bare "/local-backup-dir/"
    
  2. Fetch everything from the remote repo into the local repo that is not there yet:

    git -C "/local-backup-dir/" fetch --force --prune https://example.com/repo-clone-url/ refs/heads/*:refs/heads/* refs/tags/*:refs/tags/*
    

Of course, /local-backup-dir/ must be a valid path for your operating system (e.g. c:\example\ for Windows).