bzr - create tgz file containing full repository
I'm trying to backup my shared bzr repository. I have looked at bzr export hotcopy.tgz
but it seems only to take a snapshot of the latest revision.
Is there a command for doing backups, or do I have to
- full checkout into a tmp dir
- compress the tmp dir
- remove the tmp dir
Or is there a better way to b开发者_运维百科ackup a bzr repository?
You could try something like this:
mkdir /tmp/emptyrepos && bzr init /tmp/emptyrepos && bzr send -r 1..last:1 -o - /tmp/emptyrepos | gzip > mybackup.bzr.gz
That will create a bazaar native format merge-directive which you could apply to an empty repository to re-create all state.
Alternatively, it's likely safe to just tar up the current checkout. The on-disk format should be designed to safely deal with partial updates you may grab with tar.
精彩评论