You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Han The Man <ha...@hotmail.com> on 2003/08/24 21:36:16 UTC
0.28 and schema change
I noticed somewhere that 0.28 will have schema changes.
We are currently running 0.27 and at this point, we've migrated about 25
projects into 20 repositories. Do we need to dump/load each repository?
What is the easiest way to upgrade to 0.28 when it's out?
Is there a tool that will upgrade all repositories? I hope so - by next
week, we're probably done migrating, having about 30 repositories...
Thanks in advance!
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by mark benedetto king <mb...@lowlatency.com>.
On Mon, Aug 25, 2003 at 11:48:27PM -0700, Justin Erenkrantz wrote:
> --On Monday, August 25, 2003 11:32 PM -0500 cmpilato@collab.net wrote:
>
> >What happens if you 'mv db/uuids db/was-uuids' before trying a dump
> >of your old database with new(er) Subversion code (0.27.0, say) ?
>
> The dump succeeds and it places a UUID in the dumpfile.
>
> I wonder how the uuid table got to be blank in the first place. -- justin
>
Is it possible that the old repositories were subtly and non-fatally
corrupted?
--ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by cm...@collab.net.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
> --On Monday, August 25, 2003 11:32 PM -0500 cmpilato@collab.net wrote:
>
> > What happens if you 'mv db/uuids db/was-uuids' before trying a dump
> > of your old database with new(er) Subversion code (0.27.0, say) ?
>
> The dump succeeds and it places a UUID in the dumpfile.
>
> I wonder how the uuid table got to be blank in the first place. -- justin
I dunno. Perhaps your repos was created during some bug-ful
intermediate state w.r.t. the UUID code?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Monday, August 25, 2003 11:32 PM -0500 cmpilato@collab.net wrote:
> What happens if you 'mv db/uuids db/was-uuids' before trying a dump
> of your old database with new(er) Subversion code (0.27.0, say) ?
The dump succeeds and it places a UUID in the dumpfile.
I wonder how the uuid table got to be blank in the first place. -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by cm...@collab.net.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
> --On Monday, August 25, 2003 7:07 PM -0500 cmpilato@collab.net wrote:
>
> > That's really odd. Our filesystem code creates a new 'uuids' table if
> > that table isn't found.
>
> Well, that's what I thought, too. r4392 can dump it, but r6590 can't
> (and intermediate versions we had installed - 5613, 6109 - also fail).
>
> Here's what I get:
>
> % /usr/local/svn-install/svn-r6590/bin/svnadmin dump wiki.old
> SVN-fs-dump-format-version: 2
>
> svn: Berkeley DB error
> svn: Berkeley DB error while get repository uuid for filesystem wiki.old/db:
> DB_NOTFOUND: No matching key/data pair found
> % /usr/local/bin/db4_dump -h wiki.old/db uuids
> VERSION=3
> format=bytevalue
> type=recno
> re_len=36
> HEADER=END
> DATA=END
>
> No data there. FWIW, the new repository has:
>
> % /usr/local/bin/db4_dump -h wiki/db uuids
> VERSION=3
> format=bytevalue
> type=recno
> re_len=36
> HEADER=END
> 39646133336438302d616363352d303331302d386630642d663161656233656463366432
> DATA=END
>
> HTH. So, I think we created a new UUID when we imported.
>
> Let me know if there's anything else I can provide. But, boy, am I
> glad we kept really old versions around.
This is insane. It is absolutely not how the Subversion code was
written to work, and not how it behaves for me. I mean, I can
repeatedly remove the uuids table from my repository, run 'svnadmin
dump', and get no error. See how the UUID gets generated anew each
time?
$ svnadmin dump foo | grep UUID
* Dumped revision 0.
* Dumped revision 1.
UUID: 5cfd6d54-c4c5-0310-808f-d49363ad8054
$ rm foo/db/uuids
$ svnadmin dump foo | grep UUID
* Dumped revision 0.
* Dumped revision 1.
UUID: c91fa557-c4c5-0310-b62f-bff0f61c59a0
$ rm foo/db/uuids
$ svnadmin dump foo | grep UUID
* Dumped revision 0.
* Dumped revision 1.
UUID: 1503d457-c4c5-0310-9fd6-e38dcf03b400
$ rm foo/db/uuids
$ svnadmin dump foo | grep UUID
* Dumped revision 0.
* Dumped revision 1.
UUID: 16592958-c4c5-0310-a78e-b35be8769eea
What happens if you 'mv db/uuids db/was-uuids' before trying a dump
of your old database with new(er) Subversion code (0.27.0, say) ?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Monday, August 25, 2003 7:07 PM -0500 cmpilato@collab.net wrote:
> That's really odd. Our filesystem code creates a new 'uuids' table if
> that table isn't found.
Well, that's what I thought, too. r4392 can dump it, but r6590 can't (and
intermediate versions we had installed - 5613, 6109 - also fail).
Here's what I get:
% /usr/local/svn-install/svn-r6590/bin/svnadmin dump wiki.old
SVN-fs-dump-format-version: 2
svn: Berkeley DB error
svn: Berkeley DB error while get repository uuid for filesystem wiki.old/db:
DB_NOTFOUND: No matching key/data pair found
% /usr/local/bin/db4_dump -h wiki.old/db uuids
VERSION=3
format=bytevalue
type=recno
re_len=36
HEADER=END
DATA=END
No data there. FWIW, the new repository has:
% /usr/local/bin/db4_dump -h wiki/db uuids
VERSION=3
format=bytevalue
type=recno
re_len=36
HEADER=END
39646133336438302d616363352d303331302d386630642d663161656233656463366432
DATA=END
HTH. So, I think we created a new UUID when we imported.
Let me know if there's anything else I can provide. But, boy, am I glad we
kept really old versions around.
I wonder if others may hit this. -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by cm...@collab.net.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
> --On Sunday, August 24, 2003 17:11:23 -0500 cmpilato@collab.net wrote:
>
> > # Dump the old repos into the temporary repos
> > old-svnadmin dump ${repos} | svnadmin load tmp-repos
>
> Just as a data point, recent svnadmin's (yes, pre-schema change) won't
> dump out format 1 repositories without a UUID. I had to back off to a
> version that pre-dated the UUID changes to get a workable dump -
> probably circa 0.17.
>
> I don't recall if the UUID was a mandatory dump/load, I thought it
> wasn't. Oh, well. But, this may come up as people try to dump
> pre-UUID repositories with moderately 'current' SVN's. -- justin
That's really odd. Our filesystem code creates a new 'uuids' table if
that table isn't found.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Sunday, August 24, 2003 17:11:23 -0500 cmpilato@collab.net wrote:
> # Dump the old repos into the temporary repos
> old-svnadmin dump ${repos} | svnadmin load tmp-repos
Just as a data point, recent svnadmin's (yes, pre-schema change) won't dump
out format 1 repositories without a UUID. I had to back off to a version
that pre-dated the UUID changes to get a workable dump - probably circa
0.17.
I don't recall if the UUID was a mandatory dump/load, I thought it wasn't.
Oh, well. But, this may come up as people try to dump pre-UUID
repositories with moderately 'current' SVN's. -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 0.28 and schema change
Posted by cm...@collab.net.
"Han The Man" <ha...@hotmail.com> writes:
> I noticed somewhere that 0.28 will have schema changes.
>
> We are currently running 0.27 and at this point, we've migrated about
> 25 projects into 20 repositories. Do we need to dump/load each
> repository? What is the easiest way to upgrade to 0.28 when it's out?
>
> Is there a tool that will upgrade all repositories? I hope so - by
> next week, we're probably done migrating, having about 30
> repositories...
I know of no such tool. But if the repositories are all in a single
directory, it should be fairly simple to script the process.
I probably shouldn't advocate doing things this way, but what the
heck. This is how I do it, since I know how the filesystem works.
And since I keep extra junk in my repos directories sometimes (besides
hooks and such), I don't want to lose that in a conversion.
Follow my pseudocode, if you will:
# Make a backup directory for unconverted repositories
mkdir BACKUP
# Now, loop over the list of repositories
for repos in repos-list; do
# Backup the old repos
cp -R ${repos} BACKUP
# Make a new, temporary repos
rm -rf tmp-repos
svnadmin create tmp-repos
# Dump the old repos into the temporary repos
old-svnadmin dump ${repos} | svnadmin load tmp-repos
# Replace the db/ directory from the old repos with the db/
# directory from the new, temporary repos
rm -rf ${repos}/db; mv tmp-repos/db ${repos/db}
# Finally, bump the repository format number
echo "2" > ${repos}/format
[insert any disclaimers you can think of here]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org