Subversion: Restore deleted files
Posted on September 17th, 2008 by Sacha Chua
If you accidentally delete a file and then commit the change, you can retrieve the file along with the rest of the history by using svn copy to copy it into your working directory. svn copy -r revision-number your-full-repository-path-to-the-file file
Save to - del.icio.us - Digg it - reddit - StumbleUpon
Thank you for your posting. Can you give an example of the full repository path? Is this something that exists in all installations of OS 10.5, or does it have to be setup separately?
Also, sorry for asking, but what is a "revision-number" and how do I find it?
Thanks.
I was trying to restore a deleted file through Subclipse on Eclipse. I don't know how to submit a console command to Subclipse, and I couldn't use "Restore from local history," since it was deleted by someone else. The only way I found to do it was to go through the parent folder's history and find what revision deleted the file. I then went to the SVN Repository and checked out the parent folder with the revision just before the delete.
Paulie,
This blog post explains how to do it in Subclipse:
http://markphip.blogspot.com/2007/01/how-to-undo-commit-in-subversion.html
Mark
For some reason, the above syntax for specifying the revision didn't work for me, and I kept getting "path not found errors". It's probably because of some strange setup in our svn server.
Instead I had to specify the revision number in the svn url like this:
svn copy http://svn.mycomp.org/repos/project/MyFile.java@99 MyFile.javaI am using subversion last 6 month.i have 6 month data in svn server.my data's and configuration foldes also deleted,i am copied subversion repository folder structure full path daily basis.so i replace the subversion repository folder structure previous date backup.now it's working fine.
1.But if i don't have backup of SubversionRepository folder structure, then how to retrive the data?
2.if i have backup of SubversionRepository folder structure, when server is down,then how to configure/restore to another system on old repository folder structure?
Please help me.
Thanks,Vel
Err, I'm not sure. Good luck finding out!
1.Q: if i don't have backup of SubversionRepository folder structure, then how to retrive the data?
Ans:Try to use the recovery software and get the data after follow the second point.
2.Q:if we have backup of SubversionRepository folder structure, when server is down,then how to configure/restore to another system on old repository folder structure?
Ans:If we have tape drive backup of SubversionRepository folder structure we can restore the data to another one system.i followed the command and successfully restored
svnadmin dump C:/SubversionRepository > D:/repository.dumpfile
svnadmin load G:/SubversionRepository < D:/repository.dumpfile
C:/SubversionRepository —– Old Repository path
D:/repository.dumpfile —— Backup path
G:/SubversionRepository —— New Repository path
Thanks for sharing! =)
[...] play ball, and returned path not found. More googling ensued and pgier, commenting on a post at Sachachua supplied the following code (which worked, again substitute the revision and paths as [...]