You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jonathan Ashley <jo...@praxis-his.com> on 2008/02/12 12:53:25 UTC

Moving locks from one repository to another

Hi,

I am going to move a Subversion repository to a new machine. I was
planning to use svnadmin dump / load, because I need to filter out a
confidential document that accidentally got committed.

My question is: what will happen to the various locks that users are
holding? There are quite a few, because we keep Word documents in the
repository. Is it possible to migrate them to the new server - say by
copying the contents of the db/locks folder?

Thanks,
--
Jon Ashley


This email is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, be advised that you have received this email in error and that any use, disclosure, copying or distribution or any action taken or omitted to be taken in reliance on it is strictly prohibited. If you have received this email in error please contact the sender. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Praxis. 

Although this email and any attachments are believed to be free of any virus or other defect, no responsibility is accepted by Praxis or any of its associated companies for any loss or damage arising in any way from the receipt or use thereof. The IT Department at Praxis can be contacted at it.support@praxis-his.com.

Praxis High Integrity Systems Ltd:

Company Number: 3302507, registered in England and Wales

Registered Address: 20 Manvers Street, Bath. BA1 1PX

VAT Registered in Great Britain: 682635707


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


RE: Moving locks from one repository to another

Posted by Jonathan Ashley <jo...@praxis-his.com>.
> > I am going to move a Subversion repository to a new machine. I was
> > planning to use svnadmin dump / load, because I need to
> filter out a
> > confidential document that accidentally got committed.
> >
> > My question is: what will happen to the various locks that
> users are
> > holding? There are quite a few, because we keep Word
> documents in the
> > repository. Is it possible to migrate them to the new
> server - say by
> > copying the contents of the db/locks folder?
>
> The dump format does not have a place for lock information.
> All files will be unlocked when you import the dump into a
> new repository. :-/

That's what I remember from the last time I did this... :-(
I hadn't anticipated it and the aftermath was a bit painful.

My cunning plan is to zip up the contents of the db/locks folder
on the old repository, and unzip it into the new one. I've looked
at the files inside, and they're a bunch of files named according
to the md5sum of the locked paths, sharded by the first three
characters. They contain either lock token information (if they
refer to leaf files) or a list of pointers to child md5sums (if
they refer to folders).

So there's nothing in there that looks repository-specific,
especially since I'm planning to keep the same repository UUID.
The only way I anticipate coming unstuck is if there's a bit of
data somewhere _else_ in the repository, which says, for example,
that there should be exactly 782 lock tokens present.

Anyway, I've got a support ticket raised with CollabNet for this
at the moment, so I'll see what they say. I might try a little
experiment moving a small sandbox repository to a new host too.

Thanks for your reply. I forgot to mention I was using an FSFS
repository, but I guess that's obvious by now. I'll report the
outcome to the list when I've finished doing the real move.

regards,
--
Jon Ashley


This email is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, be advised that you have received this email in error and that any use, disclosure, copying or distribution or any action taken or omitted to be taken in reliance on it is strictly prohibited. If you have received this email in error please contact the sender. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Praxis. 

Although this email and any attachments are believed to be free of any virus or other defect, no responsibility is accepted by Praxis or any of its associated companies for any loss or damage arising in any way from the receipt or use thereof. The IT Department at Praxis can be contacted at it.support@praxis-his.com.

Praxis High Integrity Systems Ltd:

Company Number: 3302507, registered in England and Wales

Registered Address: 20 Manvers Street, Bath. BA1 1PX

VAT Registered in Great Britain: 682635707


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Moving locks from one repository to another

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 12, 2008, at 06:53, Jonathan Ashley wrote:

> I am going to move a Subversion repository to a new machine. I was
> planning to use svnadmin dump / load, because I need to filter out a
> confidential document that accidentally got committed.
>
> My question is: what will happen to the various locks that users are
> holding? There are quite a few, because we keep Word documents in the
> repository. Is it possible to migrate them to the new server - say by
> copying the contents of the db/locks folder?

The dump format does not have a place for lock information. All files  
will be unlocked when you import the dump into a new repository. :-/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Moving locks from one repository to another

Posted by Jonathan Ashley <jo...@praxis-his.com>.
>> > I am going to move a Subversion repository to a new machine. I was
>> > planning to use svnadmin dump / load, because I need to
>> filter out a
>> > confidential document that accidentally got committed.
>> >
>> > My question is: what will happen to the various locks that
>> users are
>> > holding? There are quite a few, because we keep Word
>> documents in the
>> > repository. Is it possible to migrate them to the new
>> server - say by
>> > copying the contents of the db/locks folder?
>>
>> The dump format does not have a place for lock information.
>> All files will be unlocked when you import the dump into a new
>> repository. :-/
>
>That's what I remember from the last time I did this... :-( I
>hadn't anticipated it and the aftermath was a bit painful.
>
>My cunning plan is to zip up the contents of the db/locks folder on
>the old repository, and unzip it into the new one. I've looked at
>the files inside, and they're a bunch of files named according to
>the md5sum of the locked paths, sharded by the first three characters.
>They contain either lock token information (if they refer to leaf files)
>or a list of pointers to child md5sums (if they refer to folders).

It might be of interest to list members to know that this seems to
have worked perfectly.

regards,
--
Jon Ashley


This email is confidential and intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient, be advised that you have received this email in error and that any use, disclosure, copying or distribution or any action taken or omitted to be taken in reliance on it is strictly prohibited. If you have received this email in error please contact the sender. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Praxis. 

Although this email and any attachments are believed to be free of any virus or other defect, no responsibility is accepted by Praxis or any of its associated companies for any loss or damage arising in any way from the receipt or use thereof. The IT Department at Praxis can be contacted at it.support@praxis-his.com.

Praxis High Integrity Systems Ltd:

Company Number: 3302507, registered in England and Wales

Registered Address: 20 Manvers Street, Bath. BA1 1PX

VAT Registered in Great Britain: 682635707


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org