You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by wrodrigues201 <wr...@gmail.com> on 2010/11/08 15:20:23 UTC

restored deleted data on subversion

Hello,

Our subversion (1.4.3-r23084 on windows 2003) was holding around 1.6 TB 
of data and one user has accidentally deleted a directory of 1 TB. I 
have done a svn export from the previous version and have the data. Do I 
have to add and again commit this data ? Will it use up 1 TB of disk 
space on the svn server ? Is there any way i can restore the data from 
the previous version without using up 1 TB of disk space ?

Thanks in advance.

wrodrigues

Re: restored deleted data on subversion

Posted by Arpad Ilia <ia...@inf.u-szeged.hu>.
> On 11/08/2010 10:35 PM, Campbell Allan wrote:
> > On Monday 08 Nov 2010, wrodrigues201 wrote:
> >> Hello,
> >> 
> >> Our subversion (1.4.3-r23084 on windows 2003) was holding around 1.6 TB
> >> of data and one user has accidentally deleted a directory of 1 TB. I
> >> have done a svn export from the previous version and have the data. Do I
> >> have to add and again commit this data ? Will it use up 1 TB of disk
> >> space on the svn server ? Is there any way i can restore the data from
> >> the previous version without using up 1 TB of disk space ?
> >> 
> >> Thanks in advance.
> >> 
> >> wrodrigues
> > 
> > If I understand correctly, nothing has been deleted from the server it
> > just isn't anymore in the working copy? If that is the case then
> > assuming it wasn't too long ago or you do not mind redoing/merging the
> > commits then you could take a copy of the trunk/branch prior to the
> > delete and rename this back. The delete would still have occurred but on
> > the branch that no longer matters and once you're happy that can be
> > deleted too. This will only take up the space required for a few copies
> > of the parent, nowhere near the 1TB of the content. Something like
> > 
> > svn copy https://svnserver/svn/project/trunk@12345 \
> > 
> >   https://svnserver/svn/project/trunkcopy
> > 
> > svn move https://svnserver/svn/project/trunk \
> > 
> >   https://svnserver/svn/project/trunkold
> > 
> > svn move https://svnserver/svn/project/trunkcopy \
> > 
> >   https://svnserver/svn/project/trunk

Wouldn't have it been easier to just simply reverse merge the changeset that deleted the directory? E.g. (in an up to date a working copy)

svn merge -r 12345:12344 https://svnserver/svn/project/trunk

This should remove the r12345 changeset. Or did I miss something?


iarpad

> 
> Hello Allan,
> 
> Thanks your suggestions worked like a charm.

Re: restored deleted data on subversion

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Sun, Nov 14, 2010 at 2:16 AM, wrodrigues201 <wr...@gmail.com> wrote:
> On 11/08/2010 10:35 PM, Campbell Allan wrote:
>>
>> On Monday 08 Nov 2010, wrodrigues201 wrote:
>>
>>>
>>> Hello,
>>>
>>> Our subversion (1.4.3-r23084 on windows 2003) was holding around 1.6 TB
>>> of data and one user has accidentally deleted a directory of 1 TB. I
>>> have done a svn export from the previous version and have the data. Do I
>>> have to add and again commit this data ? Will it use up 1 TB of disk
>>> space on the svn server ? Is there any way i can restore the data from
>>> the previous version without using up 1 TB of disk space ?
>>>
>>> Thanks in advance.
>>>
>>> wrodrigues
>>>
>>
>> If I understand correctly, nothing has been deleted from the server it
>> just
>> isn't anymore in the working copy? If that is the case then assuming it
>> wasn't too long ago or you do not mind redoing/merging the commits then
>> you
>> could take a copy of the trunk/branch prior to the delete and rename this
>> back. The delete would still have occurred but on the branch that no
>> longer
>> matters and once you're happy that can be deleted too. This will only take
>> up
>> the space required for a few copies of the parent, nowhere near the 1TB of
>> the content. Something like
>>
>> svn copy https://svnserver/svn/project/trunk@12345 \
>>  https://svnserver/svn/project/trunkcopy
>>
>> svn move https://svnserver/svn/project/trunk \
>>  https://svnserver/svn/project/trunkold
>>
>> svn move https://svnserver/svn/project/trunkcopy \
>>  https://svnserver/svn/project/trunk
>>
>>
>>
>>
>
> Hello Allan,
>
> Thanks your suggestions worked like a charm.


And it saves the repository space of importing 1 Terabyte of raw data
that is already present, with history.

This sort of accident is why it's often a good idea to restrict
"users" to working in branches, and having only an administrator able
to commit things to trunks. It's also why it's so useful to have
occasional, locked down tags, to provide good points to revert big
accidental changes from.

Re: restored deleted data on subversion

Posted by wrodrigues201 <wr...@gmail.com>.
On 11/08/2010 10:35 PM, Campbell Allan wrote:
> On Monday 08 Nov 2010, wrodrigues201 wrote:
>    
>> Hello,
>>
>> Our subversion (1.4.3-r23084 on windows 2003) was holding around 1.6 TB
>> of data and one user has accidentally deleted a directory of 1 TB. I
>> have done a svn export from the previous version and have the data. Do I
>> have to add and again commit this data ? Will it use up 1 TB of disk
>> space on the svn server ? Is there any way i can restore the data from
>> the previous version without using up 1 TB of disk space ?
>>
>> Thanks in advance.
>>
>> wrodrigues
>>      
>
> If I understand correctly, nothing has been deleted from the server it just
> isn't anymore in the working copy? If that is the case then assuming it
> wasn't too long ago or you do not mind redoing/merging the commits then you
> could take a copy of the trunk/branch prior to the delete and rename this
> back. The delete would still have occurred but on the branch that no longer
> matters and once you're happy that can be deleted too. This will only take up
> the space required for a few copies of the parent, nowhere near the 1TB of
> the content. Something like
>
> svn copy https://svnserver/svn/project/trunk@12345 \
>   https://svnserver/svn/project/trunkcopy
>
> svn move https://svnserver/svn/project/trunk \
>   https://svnserver/svn/project/trunkold
>
> svn move https://svnserver/svn/project/trunkcopy \
>   https://svnserver/svn/project/trunk
>
>
>
>    
Hello Allan,

Thanks your suggestions worked like a charm.

Re: restored deleted data on subversion

Posted by Campbell Allan <ca...@sword-ciboodle.com>.
On Monday 08 Nov 2010, wrodrigues201 wrote:
> Hello,
>
> Our subversion (1.4.3-r23084 on windows 2003) was holding around 1.6 TB
> of data and one user has accidentally deleted a directory of 1 TB. I
> have done a svn export from the previous version and have the data. Do I
> have to add and again commit this data ? Will it use up 1 TB of disk
> space on the svn server ? Is there any way i can restore the data from
> the previous version without using up 1 TB of disk space ?
>
> Thanks in advance.
>
> wrodrigues


If I understand correctly, nothing has been deleted from the server it just 
isn't anymore in the working copy? If that is the case then assuming it 
wasn't too long ago or you do not mind redoing/merging the commits then you 
could take a copy of the trunk/branch prior to the delete and rename this 
back. The delete would still have occurred but on the branch that no longer 
matters and once you're happy that can be deleted too. This will only take up 
the space required for a few copies of the parent, nowhere near the 1TB of 
the content. Something like

svn copy https://svnserver/svn/project/trunk@12345 \
 https://svnserver/svn/project/trunkcopy

svn move https://svnserver/svn/project/trunk \
 https://svnserver/svn/project/trunkold

svn move https://svnserver/svn/project/trunkcopy \
 https://svnserver/svn/project/trunk



-- 

__________________________________________________________________________________
Sword Ciboodle is the trading name of ciboodle Limited (a company 
registered in Scotland with registered number SC143434 and whose 
registered office is at India of Inchinnan, Renfrewshire, UK, 
PA4 9LH) which is part of the Sword Group of companies.

This email (and any attachments) is intended for the named
recipient(s) and is private and confidential. If it is not for you, 
please inform us and then delete it. If you are not the intended 
recipient(s), the use, disclosure, copying or distribution of any 
information contained within this email is prohibited. Messages to 
and from us may be monitored. If the content is not about the 
business of the Sword Group then the message is neither from nor 
sanctioned by us.

Internet communications are not secure. You should scan this
message and any attachments for viruses. Under no circumstances
do we accept liability for any loss or damage which may result from
your receipt of this email or any attachment.
__________________________________________________________________________________

Re: restored deleted data on subversion

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 8, 2010, at 09:20, wrodrigues201 wrote:

> Our subversion (1.4.3-r23084 on windows 2003) was holding around 1.6 TB of data and one user has accidentally deleted a directory of 1 TB. I have done a svn export from the previous version and have the data. Do I have to add and again commit this data ? Will it use up 1 TB of disk space on the svn server ? Is there any way i can restore the data from the previous version without using up 1 TB of disk space ?

You may want to review the sections of the book dealing with "Undoing Changes" and "Resurrecting Deleted Items", starting here:

http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo

If done correctly, this should not end up taking a lot of space in the repository.

You may also want to upgrade to the current version of Subversion, 1.6.13; Subversion 1.4.x and earlier aren't supported anymore.