开发者

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

  1. full checkout into a tmp dir
  2. compress the tmp dir
  3. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜