You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Upinder S. Bhalla" <bh...@ncbs.res.in> on 2006/06/11 13:00:29 UTC

Rebuilding deleted SVN repository

Hi,
  I forgot to back up my SVN repository files from /opt when I upgraded my
OS. The disk has been wiped and reformatted. I do have the user
subdirectory with the current files and the local .svn subdirectory with
the working revision. I realize most of my project history is history,
but I would like to reconstruct my SVN project back to the last
revision. What should I do?

Thanks,
  Upi Bhalla




---------------------------------------------------------------------
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 Duncan Murdoch <mu...@stats.uwo.ca>.
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

---------------------------------------------------------------------
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>.
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?

-- Upi



On Sun, June 11, 2006 7:06 pm, Ryan Schmidt said:
> On Jun 11, 2006, at 15:00, Upinder S. Bhalla wrote:
>
>>   I forgot to back up my SVN repository files from /opt when I
>> upgraded my
>> OS. The disk has been wiped and reformatted. I do have the user
>> subdirectory with the current files and the local .svn subdirectory
>> with
>> the working revision. I realize most of my project history is history,
>> but I would like to reconstruct my SVN project back to the last
>> revision. What should I do?
>
> If you didn't back up the repository, then the history is gone, so
> you only have the revision that's currently checked out in your
> working copy. You could import that into a new repository and start
> over from there.
>
> I believe Subversion (at least the current version, 1.3.2) will
> ignore the .svn directories when importing, so you should just be
> able to "svnadmin create" the repository, "svn import" your old
> working copy into it, and "svn checkout" a new working copy from the
> new repository and get back to work.
>

---------------------------------------------------------------------
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 Nico Kadel-Garcia <nk...@comcast.net>.
Ryan Schmidt wrote:
> On Jun 11, 2006, at 15:00, Upinder S. Bhalla wrote:
>
>>   I forgot to back up my SVN repository files from /opt when I
>> upgraded my
>> OS. The disk has been wiped and reformatted. I do have the user
>> subdirectory with the current files and the local .svn subdirectory
>> with
>> the working revision. I realize most of my project history is
>> history, but I would like to reconstruct my SVN project back to the
>> last revision. What should I do?
>
> If you didn't back up the repository, then the history is gone, so
> you only have the revision that's currently checked out in your
> working copy. You could import that into a new repository and start
> over from there.
>
> I believe Subversion (at least the current version, 1.3.2) will
> ignore the .svn directories when importing, so you should just be
> able to "svnadmin create" the repository, "svn import" your old
> working copy into it, and "svn checkout" a new working copy from the
> new repository and get back to work.

I've had a lot of problems with the "import" command creating subdirectories 
or not when doing the import. In particular, when creating a "trunk", for 
something called "project", I kept winding up with 
http://server/repo/project/trunk/project, instead of  the expected 
http://server/repo/project/trunk/. It seemed to work best if I made sure 
there was no "trunk" directory already in place.

---------------------------------------------------------------------
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 Ryan Schmidt <su...@ryandesign.com>.
On Jun 11, 2006, at 15:00, Upinder S. Bhalla wrote:

>   I forgot to back up my SVN repository files from /opt when I  
> upgraded my
> OS. The disk has been wiped and reformatted. I do have the user
> subdirectory with the current files and the local .svn subdirectory  
> with
> the working revision. I realize most of my project history is history,
> but I would like to reconstruct my SVN project back to the last
> revision. What should I do?

If you didn't back up the repository, then the history is gone, so  
you only have the revision that's currently checked out in your  
working copy. You could import that into a new repository and start  
over from there.

I believe Subversion (at least the current version, 1.3.2) will  
ignore the .svn directories when importing, so you should just be  
able to "svnadmin create" the repository, "svn import" your old  
working copy into it, and "svn checkout" a new working copy from the  
new repository and get back to work.


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