Hi Daniel, Stephan.

My name is Jean-Baptiste Dubois, I work with Philippe.

First of all, we are grateful for supporting us on our SVN troubles...



Just few words to explain you our current situation:

Our company has been cyber attacked few months ago and both SVN server and the 
backup (yes we had a backup !) are now encrypted for ever ....

One month before the attack, the physical hard  drive used by our SVN server 
has been replaced, and the old one has been used for another usage...

We recently worked closely with a company expert on hard drive data recovery, 
and they recover 70% of the files of SVN database (~20GB)



We are using svn 1.4 with a 'fsfs' backend, format revision 2.

Inside the 'db' folder we have 'rev', 'revprops' 'transactions' folder contains 
files.

Some files are missing but the company told us that all files recovered are 
fully recovered (ie: file integrity is OK).



I know that we could not restore the entire database, but can we extract some 
'SVN plain data' from file in 'revs' folder

Hereunder a view of thoses files (ordered by Size) ...

[revs]





Is it possible to detect plain data with no dependency on previous revs inside 
these 'revs' files and extract them ?

I try to used and patched the fsfsverify.py script without success.



BR,

Jean-Baptiste.



-----Message d'origine-----
De : Daniel Shahaf <d...@daniel.shahaf.name>
Envoyé : mercredi, mars 3, 2021 22:22
À : users@subversion.apache.org
Cc : Philippe DEMOUSTIER <pdemoust...@groupe-atlantic.com>; Jean-Baptiste 
DUBOIS <jbdub...@groupe-atlantic.com>
Objet : Re: Restoring svn database



Stefan Sperling wrote on Wed, Mar 03, 2021 at 11:15:26 +0100:

> On Wed, Mar 03, 2021 at 08:03:08AM +0000, Philippe DEMOUSTIER wrote:

> > Following an issue on our servers, we lost approximatively 30% of our svn 
> > database.

> > Admin dump fails so we're trying to restore some data manually.



_Which_ 30% did you lose?



> > How can we restore data between SVN and ENDREP tags ?

> >

> > DELTA 30834 15564 155

> > SVN xxxxxxxxxxxxxxxxxxxxxx ENDREP

> >

> > Many thanks for your help,

> > Philippe

>

> Hi Philippe,

>

> I am afraid the short answer is that you will need to restore your repository

> from backups. If you cannot do that, then you have now learned the hard way

> that an important SVN repository needs to be backed up. The data is gone.

>

> It is virtually impossible to restore the missing data manually.



Well, it depends.



If the data is part of a directory rep, it may be possible to

reconstruct the directory rep from the node-rev headers in the same rev

file.  Moreover, even if the directory rep isn't reconstructed at all,

so long as the file content reps are intact, extracting those into files

might still be useful, even though that wouldn't restore filenames.  For

filenames, one could consult the changed-paths section of the rev file,

commit notifications, TortoiseSVN log caches (if those cache changed-paths

info?), log messages, git-svn(1) mirrors, and even nearby cpath node-rev

headers.



If the data is part of a property rep, it may be acceptable to accept

the loss of those properties and restore the remaining data.



Even if the data is part of a content rep, that isn't necessarily game

over insofar as later revisions of the same file are concerned: it's

likely that some later revisions will be able to be reconstructed

despite the loss of one interim rep.  (Because of skip-deltas and,

IIUC, max-linear-deltification)



> This data is sometimes full text, sometimes deltified content.



Philippe specified that the data starts with "SVN", so it's unlikely to

be a full text.  It might be a self-delta, but it's most probably just

a regular delta.



> The only way to generate

> equivalent data is to replay all the commits that have occurred throughout

> repository history. The tool 'svnadmin load' can do this, provided you have

> previously saved a dump file of the repository to backup storage when the

> repository was still in a healthy condition.



It's not that simple.  Nothing guarantees that the lost rep and the rep

resulting from the load would be the same length.  One would have to

check the lengths manually and deal with the differences.



> Going forward, you should consider saving repository dump files to backup

> storage, or saving backup copies of your repositories with tools such as

> 'svnadmin hotcopy' or 'svnsync'  For more information, see this page:

> http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.backup



+1



Cheers,



Daniel

Reply via email to