[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Dump/load question

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-02-06 23:44:00 CET

On Feb 6, 2007, at 13:24, Fred Mailhot wrote:

> 1) Assume I have a repo at revision 100, and I do the following:
>
> $ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
> $ svnadmin load [path-to-repo] < partial.dump
>
> Will I have eliminated revisions 91-100 of my repository?

Well... you'd have to delete the repository (or rename it or move it
out of the way for backup purposes) and create a new empty one
between those two steps:

$ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
$ mv [path-to-repo] [path-to-repo-backup]
$ svnadimn create [path-to-repo]
$ svnadmin load [path-to-repo] < partial.dump

Other than that, yes, I believe that will work. Anyone who has a
working copy of any revision higher than 90 will have to trash it and
check out a new one. (If they don't, things will probably break in
horrible ways.)

> 2) If the above works, let's now assume that my repo has a few
> subdirectories:
>
> - repo
> - foo
> - bar
> - baz
>
> and I want to "eliminate" the most recent revisions that affected
> "bar"...
> Can I do the following?
>
> $ svnadmin dump [path-to-repo] > full.dump
> $ svnadmin dump --revision 1:90 [path-to-repo] > partial.dump
> $ cat full.dump | svndumpfilter include foo > foo-full.dump
> $ cat full.dump | svndumpfilter include baz > baz-full.dump
> $ cat partial.dump | svndumpfilter include bar > bar-partial.dump
> $ svnadmin load [path-to-repo] < foo-full.dump
> $ svnadmin load [path-to-repo] < baz-full.dump
> $ svnadmin load [path-to-repo] < bar-partial.dump

As above, move the old repo out of the way, then create a new empty
one, after you create the dumps, before you try to load the dumps
back in.

Note that your revisions will get renumbered when they're loaded back
in. Whether this is a problem for you depends on how you've used your
repository. For example, if you've written lots of commit messages
like "Merged revision 5 of foobranch into trunk" then those comments
will no longer be accurate because the revision number will have
changed in the new repo.

There may be a way to avoid most of this problem but I'm not sure
because I haven't had to use svndumpfilter myself. Maybe someone else
has some better advice.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 6 23:44:33 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.