How to backup only local changes of tree-less repo?

Asked by Dimitrios Apostolou

I have a local repo with tree-less branch of lp:gcc. All in all it is about 1.4GB of metadata, of which I /think/ about 400MB correspond to branches I've created and I want to backup, and the rest is the lp:gcc data available online.

What's the proposed way of backing it up with my local disk-backup system? Would it be enough to just backup the $REPO_DIR/* directories (which correspond to my branches) and exclude the huge $REPO_DIR/.bzr?

How do I restore later, would it be enough to create a fresh tree-less branch of lp:gcc and copy those dirs in?

Thanks in advance,
Dimitris

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Martin Packman (gz) said :
#1

Push them all to your user namespace on launchpad.

Looking at the size of the .bzr dirs in the branches should demonstrate to you that just copying them won't help, the revisions are in the shared repository.

Revision history for this message
Dimitrios Apostolou (jimis) said :
#2

Thanks for the answer, but if I push them they would all become public viewable, right?

Wouldn't it be ideal if I backed up a notrees+stacked version of my repo. If I understand, no-trees means no data, stacked means no public metadata (it's fetched from online).

So how would I duplicate this repo, and convert the dup to a stacked one?

Revision history for this message
Martin Packman (gz) said :
#3

It's gcc, so I assumed we're talking free software rather that secret private things. If you're just concerned about people looking at your wip stuff and sneering, in practice no one cares. By all means mirror somewhere less accessible though.

You might want to review:

<http://doc.bazaar.canonical.com/latest/en/user-guide/core_concepts.html>

So, 'no trees' specifically means not a copy of all the files on disk, and is unrelated to your commits and repository data. Working trees do not need backing up.

You probably don't want to use stacking, it's really tailored for specific launchpad uses and would make backups more fragile.

Having a copy of 1.3Gb doesn't seem too painful to me regardless. If you're worried about incremental backups, the repository pack files are actually reasonably stable, only repacking revisions on log10 intervals. So, the largest bit of the repository will remain unchanged across updates.

Revision history for this message
Dimitrios Apostolou (jimis) said :
#4

Unfortunately I'm not confident in making public all my junk branches. And since I'm backing up to remote location over a 50KB/s DSL uplink it will take long, but I guess I'll wait the first time and then do only incremental. Ofcourse all new changes from lp:gcc from when pulling, are too many and will slow down incremental backups too. That's why I was looking for the optimal solution. Thanks for the tips though!

Can you help with this problem?

Provide an answer of your own, or ask Dimitrios Apostolou for more information if necessary.

To post a message you must log in.