You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brian Larkin <bl...@gmail.com> on 2009/05/03 23:41:14 UTC

file already exists error during svnadmin load

I'm having a problem restoring a subversion repository that was
created via the svndump command.  The dump file was created on a
debian etch (v4) system that had subversion installed via the debian
package.  I believe this is v1.4.2 of subversion.  The dump file was
created using the following command:

svnadmin dump /svn >> /tmp/svn.dump

It was then gzipped and  archived.  The file is roughly 2GB in size.
The server this repository exists on no longer exists.

I am trying to load the the file on an ubuntu system v8.10 that has
subversion installed via the ubuntu package. 8.1 uses subversion
v1.5.1 I believe.  I am trying to load the dump file using the
following steps

1. svnadmin create /svn
2. svnadmin load /svn < /tmp/svn.dump

Whenever I execute the load command, I receive the following messages:

<<< Started new transaction, based on original revision 1

------- Committed revision 1 >>>

<<< Started new transaction, based on original revision 1
     * adding path : test ... done.
svnadmin: File already exists: filesystem 'svn/db', transaction '1-1',
path 'test'
     * adding path : test ...


Then it bombs out on me.  I dug around the mailing list archives and
the only ticket I could find that seemed similar was this one:
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=857079

So, I tried checking out from the repo, creating a 'test' directory,
committing it and then using the --parent-dir argument for svnadmin
load but I receive the same error. I thought that it might be possible
that the dump was corrupt or something, but the plaintext areas are
fine from what I can see.  The first few lines of the dump are as
follows:


SVN-fs-dump-format-version: 2

UUID: d010f6ce-b37d-4982-8ef8-f6e113d283eb

SVN-fs-dump-format-version: 2

UUID: d010f6ce-b37d-4982-8ef8-f6e113d283eb

Revision-number: 0
Prop-content-length: 56
Content-length: 56

K 8
svn:date
V 27
2007-11-30T19:40:28.836355Z
PROPS-END

<<snip>>

Can anyone help me out on getting this repository loaded or recovered
in some way?

Thanks,
Brian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2050204

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: file already exists error during svnadmin load

Posted by Brian Larkin <bl...@gmail.com>.
>>
>> Stephen,
>>
>> Thanks for the quick reply.  I dug around through the file and it does
>> indeed appear to be interwoven as you suggested.  I'm at a loss to
>> describe how it happened.  Obviously one of the scripts I was using to
>> back up the system did something strange.  Any idea on how to salvage
>> this repository?
>
> That depends, can you run your dump file through grep, e.g.
>
> fgrep "Revision-number: " mydumpfile.svndump
>
> if you see two Revision-number: nnn lines for every revision nnn then you
> are fecked... you must have ran two dumps in parallel and they both were
> appending to the same file at the same time.
>
> if you only see one Revision-number: nnn for each revision, then you should
> be able to skip the first few bytes until you reach the second header.
>

Stephen,

I ran the grep you suggested:

fgrep -n -a -C 1 "Revision-number:" svn.dump

and, as you say, it looks like I'm fecked.

--
5902534-
5902535:Revision-number: 60
5902536-Prop-content-length: 125
--
5902552-
5902553:Revision-number: 60
5902554-Prop-content-length: 125
--
5902588-
5902589:Revision-number: 61
5902590-Prop-content-length: 125
--
5902606-
5902607:Revision-number: 61
5902608-Prop-content-length: 125


So I'm looking at trying to recover this data.  My plan right now is
to write a script to dig through the dump and write out the most
recent revision of a file.  Do you know if anyone has ever had to do
this or been successful doing it?

When I set all of this up I ran a backup & restore scenario to make
sure it all worked.  I guess this is a lesson for me.  Testing things
once isn't enough - you need to retest your backup procedures
periodically.

Thanks,
Brian

> -Stephen
>
>>
>> Thanks,
>> Brian
>>
>> On Mon, May 4, 2009 at 5:24 AM, Stephen Connolly
>> <st...@gmail.com> wrote:
>> > Looks like the first 4 lines are duplicated
>> >
>>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2235775

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: file already exists error during svnadmin load

Posted by Stephen Connolly <st...@gmail.com>.
2009/5/12 Brian Larkin <bl...@gmail.com>

> Stephen,
>
> Thanks for the quick reply.  I dug around through the file and it does
> indeed appear to be interwoven as you suggested.  I'm at a loss to
> describe how it happened.  Obviously one of the scripts I was using to
> back up the system did something strange.  Any idea on how to salvage
> this repository?
>

That depends, can you run your dump file through grep, e.g.

fgrep "Revision-number: " mydumpfile.svndump

if you see two Revision-number: nnn lines for every revision nnn then you
are fecked... you must have ran two dumps in parallel and they both were
appending to the same file at the same time.

if you only see one Revision-number: nnn for each revision, then you should
be able to skip the first few bytes until you reach the second header.

-Stephen


>
> Thanks,
> Brian
>
> On Mon, May 4, 2009 at 5:24 AM, Stephen Connolly
> <st...@gmail.com> wrote:
> > Looks like the first 4 lines are duplicated
> >
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2230472

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: file already exists error during svnadmin load

Posted by Brian Larkin <bl...@gmail.com>.
Stephen,

Thanks for the quick reply.  I dug around through the file and it does
indeed appear to be interwoven as you suggested.  I'm at a loss to
describe how it happened.  Obviously one of the scripts I was using to
back up the system did something strange.  Any idea on how to salvage
this repository?

Thanks,
Brian

On Mon, May 4, 2009 at 5:24 AM, Stephen Connolly
<st...@gmail.com> wrote:
> Looks like the first 4 lines are duplicated
>
> 2009/5/4 Brian Larkin <bl...@gmail.com>
>>
>> I'm having a problem restoring a subversion repository that was
>> created via the svndump command.  The dump file was created on a
>> debian etch (v4) system that had subversion installed via the debian
>> package.  I believe this is v1.4.2 of subversion.  The dump file was
>> created using the following command:
>>
>> svnadmin dump /svn >> /tmp/svn.dump
>>
>> It was then gzipped and  archived.  The file is roughly 2GB in size.
>> The server this repository exists on no longer exists.
>>
>> I am trying to load the the file on an ubuntu system v8.10 that has
>> subversion installed via the ubuntu package. 8.1 uses subversion
>> v1.5.1 I believe.  I am trying to load the dump file using the
>> following steps
>>
>> 1. svnadmin create /svn
>> 2. svnadmin load /svn < /tmp/svn.dump
>>
>> Whenever I execute the load command, I receive the following messages:
>>
>> <<< Started new transaction, based on original revision 1
>>
>> ------- Committed revision 1 >>>
>>
>> <<< Started new transaction, based on original revision 1
>>     * adding path : test ... done.
>> svnadmin: File already exists: filesystem 'svn/db', transaction '1-1',
>> path 'test'
>>     * adding path : test ...
>>
>>
>> Then it bombs out on me.  I dug around the mailing list archives and
>> the only ticket I could find that seemed similar was this one:
>>
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=857079
>>
>> So, I tried checking out from the repo, creating a 'test' directory,
>> committing it and then using the --parent-dir argument for svnadmin
>> load but I receive the same error. I thought that it might be possible
>> that the dump was corrupt or something, but the plaintext areas are
>> fine from what I can see.  The first few lines of the dump are as
>> follows:
>>
>>
>> SVN-fs-dump-format-version: 2
>>
>> UUID: d010f6ce-b37d-4982-8ef8-f6e113d283eb
>>
>> SVN-fs-dump-format-version: 2
>>
>> UUID: d010f6ce-b37d-4982-8ef8-f6e113d283eb
>>
>> Revision-number: 0
>> Prop-content-length: 56
>> Content-length: 56
>>
>> K 8
>> svn:date
>> V 27
>> 2007-11-30T19:40:28.836355Z
>> PROPS-END
>>
>> <<snip>>
>>
>> Can anyone help me out on getting this repository loaded or recovered
>> in some way?
>>
>> Thanks,
>> Brian
>>
>> ------------------------------------------------------
>>
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2050204
>>
>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe@subversion.tigris.org].
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2221787

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: file already exists error during svnadmin load

Posted by Stephen Connolly <st...@gmail.com>.
Looks like the first 4 lines are duplicated

2009/5/4 Brian Larkin <bl...@gmail.com>

> I'm having a problem restoring a subversion repository that was
> created via the svndump command.  The dump file was created on a
> debian etch (v4) system that had subversion installed via the debian
> package.  I believe this is v1.4.2 of subversion.  The dump file was
> created using the following command:
>
> svnadmin dump /svn >> /tmp/svn.dump
>
> It was then gzipped and  archived.  The file is roughly 2GB in size.
> The server this repository exists on no longer exists.
>
> I am trying to load the the file on an ubuntu system v8.10 that has
> subversion installed via the ubuntu package. 8.1 uses subversion
> v1.5.1 I believe.  I am trying to load the dump file using the
> following steps
>
> 1. svnadmin create /svn
> 2. svnadmin load /svn < /tmp/svn.dump
>
> Whenever I execute the load command, I receive the following messages:
>
> <<< Started new transaction, based on original revision 1
>
> ------- Committed revision 1 >>>
>
> <<< Started new transaction, based on original revision 1
>     * adding path : test ... done.
> svnadmin: File already exists: filesystem 'svn/db', transaction '1-1',
> path 'test'
>     * adding path : test ...
>
>
> Then it bombs out on me.  I dug around the mailing list archives and
> the only ticket I could find that seemed similar was this one:
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=857079
>
> So, I tried checking out from the repo, creating a 'test' directory,
> committing it and then using the --parent-dir argument for svnadmin
> load but I receive the same error. I thought that it might be possible
> that the dump was corrupt or something, but the plaintext areas are
> fine from what I can see.  The first few lines of the dump are as
> follows:
>
>
> SVN-fs-dump-format-version: 2
>
> UUID: d010f6ce-b37d-4982-8ef8-f6e113d283eb
>
> SVN-fs-dump-format-version: 2
>
> UUID: d010f6ce-b37d-4982-8ef8-f6e113d283eb
>
> Revision-number: 0
> Prop-content-length: 56
> Content-length: 56
>
> K 8
> svn:date
> V 27
> 2007-11-30T19:40:28.836355Z
> PROPS-END
>
> <<snip>>
>
> Can anyone help me out on getting this repository loaded or recovered
> in some way?
>
> Thanks,
> Brian
>
> ------------------------------------------------------
>
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2050204
>
> To unsubscribe from this discussion, e-mail: [
> users-unsubscribe@subversion.tigris.org].
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2054915

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].