What is a safe way of backing up a shared bzr repository

Robert Collins robertc at robertcollins.net
Tue Nov 20 01:13:37 GMT 2007


On Tue, 2007-11-20 at 10:56 +1000, Ian Clatworthy wrote:

> > Option 1: lock-and-foo
> > This is basically what my script provided.  It allows any arbitrary
> > command to be run with a locked repository.
> > 
> > Option 2: lock-and-copy
> > This folds the copying into part of the script, e.g. with shutil.copytree
> > 
> > Option 3: lock-and-fetch
> > This uses the appropriate bzr facilities such as fetch to produce (or
> > update) a mirror of the repository.  This has the advantage of
> > potentially working over remote transports, including the smart server.
> >  But the remote transport must be listable in order for Bazaar to
> > discover branches.  This option is typically much slower than the others.
> > 
> > Further thoughts?
> 
> I really like option 1. It's a pretty powerful feature to say "this will
> lock your repository in a consistent state so you can do what you want
> safely". As well as copying content for backup purposes, I can see it
> being useful for other things teams may wish to do. Perhaps options 2
> and 3 could be provided via options or sample scripts?

Be very aware that with packs you will be excluding other writers for
much much longer than bzr needs to create a consistent copy, if you take
anything other that option 3.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071120/e79a2837/attachment.pgp 


More information about the bazaar mailing list