Switching to a different master

The biggest day-to-day benefit of mirroring is clearly that it can make read access more network-efficient for projects where the development team is widely distributed, albeit at the cost of an extra server at each slave location.

However, there's obviously one more advantage. If the main server for a repository should fail, one of the mirrors can easily be removed from the list of slaves and be made the master. As long as there are no network problems, the slave should be in the same state as the master, so no commits are lost.

Tip

Mirroring is not the same as backup. It is outside the scope of this book to discuss the differences, but you should always have a reliable backup system in place for all your servers ...

Get Gitolite Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.