You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by gerardo arnaez <ga...@gmail.com> on 2006/06/11 15:56:05 UTC

Recreate Repository from a Checkout

Hi all.
I've googled and cant find this answer

Can I recreate the original repository if all I have is a check out.
ie suppose I lost the original but I have a checkout, can I make this
eventually into the orginal so I can checkout from it again?

Another way of asking this is: is the only way to create backups svnadmin dump?

\t\\thanks all

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

Re: Rebuilding deleted SVN repository

Posted by "Upinder S. Bhalla" <bh...@ncbs.res.in>.
On Sun, June 11, 2006 7:54 pm, Duncan Murdoch said:
> On 6/11/2006 9:51 AM, Upinder S. Bhalla wrote:
>> Thanks - I see that my earlier history is gone. But is there a way to
use
>> the local .svn files to populate the rebuilt repository with the most
recent previous revision in addition to the current state?
>
> This is probably a little tricky to get right on the first attempt, so
first you should back up your current working copy (including all the .svn
directories).
>
> Then: make another copy of it somewhere, say OLD.  Use svn revert in OLD
to  undo all the local changes, and do your import from OLD.
>
> Then cd over to the pristine copy of your locally modified copy, and use
svn status to find all the local modifications.  Copy all modified files
over to OLD (overwriting what is there), do all deletes and adds in OLD,
until OLD looks just like your locally modified version, and svn status
there returns the same thing.   Then commit those changes.
>
> Then back up your repository.
>
> Duncan Murdoch
>

Great, this works with a small modification. The instructions were OK up
to creating the OLD, reverting in it, and doing the import from OLD.

Now I made one big change: I want the SVN repository to be in a different
place so I won't forget to back it up ever again. I proceeded with the
next step ( copying over modified files into OLD till it looks like my
locally modified version). This went fine. But when I tried to commit it,
it complained:
svn: Commit failed (details follow):
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///opt/SVN/moose/trunk'

I interpret this to mean that it is still trying to dump the files into
the old repository, specified in the local .svn administration
directories.
Option 1: Hack into the files in the .svn directories to change the path.
A quick grep suggests where I should look, in a file called entries. If I
knew enough about the system I might do this, but I don't want to mess
things up.

Option 2: Check out version 1 into a temporary location. Copy over modified
files into this checked out version, do the adds etc, as before. Now
commit it. This works.

> Then back up your repository.
Oh, yes!

Thanks,
-- Upi Bhalla






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

Re: Recreate Repository from a Checkout

Posted by Duncan Murdoch <mu...@stats.uwo.ca>.
On 6/11/2006 11:56 AM, gerardo arnaez wrote:
> Hi all.
> I've googled and cant find this answer
> 
> Can I recreate the original repository if all I have is a check out.
> ie suppose I lost the original but I have a checkout, can I make this
> eventually into the orginal so I can checkout from it again?


The post that came in here just before yours discusses this.  See 
"Rebuilding deleted SVN repository".  The answer is "no, you've lost 
your history forever, as well as anything not checked out".

 > Another way of asking this is: is the only way to create backups 
svnadmin dump?

Actually, that's a different question.  You can also create backups 
using svk, without admin access.  (I haven't done a restore from one of 
these; it would need to be scripted, and I haven't gone looking for the 
script.  So there might be some important bits missing.)

Duncan Murdoch

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