How can I mirror a directory structure with all repositories and branches?

Michael B. Trausch mbt at zest.trausch.us
Thu Jul 2 16:37:57 BST 2009


On Thu, 2 Jul 2009, Nicholas Allen wrote:

> Thanks - I considered this but rsync won't lock when users are committing to 
> a branch. So it could mirror the directory in a half committed state. Is that 
> what you meant by possible brokenness? The mirror needs to act as a reliable 
> backup system and so brokenness if definitely not something we would want...

If your branches are on an LVM-enabled system and stored on a logical volume, 
you can create a snapshot, run 'rsync -avz' on that, and you're good to go. 
All you need to make sure of is that bzr isn't running on any of the 
repoitories at the time that the snapshot is created.

The other solution would be to use a shell script to iterate through the 
branches, doing a 'bzr push' one at a time on them to another location.  Or, 
starting several 'bzr push' instances in the background at the same time, if 
you must have point-in-time consistency amongst all the branches.

 	--- Mike



More information about the bazaar mailing list