Document Actions
04/21/2006
Dump and load foreign subversion repositories using svnadmin and svndumpfilter

What for ?


This is mostly a reminder for mysef about the way of dumping and loading subversion repositories.

Let's say I have two subversion repositories. repoA and repoB. I got a component called P at the root of repoA as below :
repoA /
P /
trunk /
branches /
tags /
What I'd like todo is to copy P from repoA to repoB preserving all the history logs for P.

Dumping the repository


Let's say I started the developement of P with revision 28000 and my last checkin related to P is at revision 38000. The revision numbers are important because it will decrease the needed time to dump the actual svn repository. Less revisions to dump means less time needed :)

We will use svnadmin to do that.

Go on the server hosting the subversion repository and dump it this way  :
$ svnadmin dump --quiet --revision 28000:38000 /home/svn/repoA > repoA.dump
This operation can last a while depending on the size of your repository.

svnadmin dump options :

$ svnadmin dump --help
dump: usage: svnadmin dump REPOS_PATH [-r LOWER[:UPPER] ] [--incremental]

Dump the contents of filesystem to stdout in a 'dumpfile'
portable format, sending feedback to stderr. Dump revisions
LOWER rev through UPPER rev. If no revisions are given, dump all
revision trees. If only LOWER is given, dump that one revision tree.
If --incremental is passed, then the first revision dumped will be
a diff against the previous revision, instead of the usual fulltext.

Valid options:
-r [--revision] arg : specify revision number ARG (or X:Y range)
--incremental : dump incrementally
--deltas : use deltas in dump output
-q [--quiet] : no progress (only errors) to stderr

Filtering P component from repoA's dump


What we are interested in here is only component P. We need to filter out for P component. We will use svndumpfilter to do that.
$ cat repoA.dump | svndumpfilter include P > P.dump
svndumpfilter options  :
$ svndumpfilter --help
general usage: svndumpfilter SUBCOMMAND [ARGS & OPTIONS ...]
Type 'svndumpfilter help <subcommand>' for help on a specific subcommand.

Available subcommands:
exclude
include
help (?, h)

Loading back P dump to repoB


Now go on the server hosting repoB. Before that, transfer your P.dump to this server. We will use svnadmin to load it back

$ svnadmin load --quiet /home/svn/repoB < P.dump
svnadmin load options :
$ svnadmin load --help
load: usage: svnadmin load REPOS_PATH
Read a 'dumpfile'-formatted stream from stdin, committing
new revisions into the repository's filesystem. If the repository
was previously empty, its UUID will, by default, be changed to the
one specified in the stream. Progress feedback is sent to stdout.
Valid options:
-q [--quiet] : no progress (only errors) to stderr
--ignore-uuid : ignore any repos UUID found in the stream
--force-uuid : set repos UUID to that found in stream, if any
--use-pre-commit-hook : call pre-commit hook before committing revisions
--use-post-commit-hook : call post-commit hook after committing revisions
--parent-dir arg : load at specified directory in repository
Here we are. You just need to remove P from repoA
$ svn remove http://svn.foo.com/repoA/P
Of course, what would be really cool, instead of the dump/load
operations, would be something like that being possible in between foreign repositories
$ svn move https://svn.foo.com/repoA/P https://svn.foo.com/repoB/

Thanks Florent for the pointers.

Posted by Julien Anguenot @ 04/21/2006 04:48 AM. - Categories: coding, linux1 comments
04/06/2006
Zope3 talk at the 15th World Wide Web international conference
I will be giving a a technical presentation of the Zope3 component architecture at the www2006 conference. This is the 15th international World Wide Web Conferene and it will take place in Edinburgh (Scotland) in May this year.

The talk I will be giving is entitled : "Mutliparadigm application development with the Zope3 component architecture" and it will be part of the developers track at the conference.

This will be a really a good occasion to introduce Zope3 to developers from the major industry players out there (Microsoft, IBM, Yahoo, Oracle, Nokia, etc...). 

They are asking people to email the track chairs if you see listed tracks that are of particular interest for you. So if you are using or making business out of Zope do not hesitate to email them saying you think scheduling a Zope3 talk was a really good idea :)



Posted by Julien Anguenot @ 04/06/2006 01:47 PM. - Categories: nuxeo, web, zope31 comments
Last modified: 12/21/2005 01:11 AM

Nuxeo Bloggers: Log in!
Nuxeo - Indesko - Nuxeo 5 Project
All content is copyrighted by their author.
CPSSkins is Copyright © 2003-2006 by Jean-Marc Orliaguet. | CPS is Copyright © 2002-2006 by Nuxeo SAS.