You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mauro Condarelli <mc...@mclink.it> on 2010/12/14 14:34:03 UTC

Restoring from old backup

 Hi,
This should be a FAQ, but I didn't find a proper answer, so here I am.

I suffered a crash in my SVN server machine.
I had a slightly old version of the repository on my backup disks.
I have a few modified working copies.

I restored the server and the repository.
All *seemed* ok, but, unfortunately, the latest version of saved repo 
was 99, while the "current" in my working copies is 104.

Now Subclipse (and TortoiseSVN) refuse to Submit my latest copy because 
"version 104 does not exist".

I understand I lost a few steps in the program history, but I would like 
to salvage as much as possible.
What is the right incantation to achieve that?

I would rather not checkout a fresh copy, move all changes to it and 
submit that, if possible, because it is too error-prone.

Can someone suggest a course of action?

TiA
Mauro

Re: Restoring from old backup

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Dec 14, 2010 at 04:35:59PM +0100, Thorsten Schöning wrote:
> Guten Tag Mauro Condarelli,
> am Dienstag, 14. Dezember 2010 um 15:34 schrieben Sie:
> 
> > I would rather not checkout a fresh copy, move all changes to it and
> > submit that, if possible, because it is too error-prone.
> 
> Some weeks ago I had the same situation, two times within one week,
> and I didn't find any other suitable solution.

The best approach is to be prepared and use a good backup strategy.

Re: Restoring from old backup

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Dec 14, 2010 at 04:35:59PM +0100, Thorsten Schöning wrote:
> Guten Tag Mauro Condarelli,
> am Dienstag, 14. Dezember 2010 um 15:34 schrieben Sie:
> 
> > I would rather not checkout a fresh copy, move all changes to it and
> > submit that, if possible, because it is too error-prone.
> 
> Some weeks ago I had the same situation, two times within one week,
> and I didn't find any other suitable solution.

The best approach is to be prepared and use a good backup strategy.

>From the post-commit hook, create an incremental dump file of every revision.
You can do this with svnadmin dump --deltas --incremental -r $REV.
This gives you nearly instant backup of every commit that made it into
the repository. Incremental dump files can be large if a large tree is
added, but in general they don't use much space.

After restoring the last full backup of the repository, load missing
revisions from the incremental dump files generated since the last
full backup was made.

You can either get rid of incremental dump files dated before the
last full backup, or keep them around in case you'll need them some day.
Having multiple backups of your data in different representations
doesn't hurt.

Stefan

Re: Restoring from old backup

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Mauro Condarelli,
am Dienstag, 14. Dezember 2010 um 15:34 schrieben Sie:

> I would rather not checkout a fresh copy, move all changes to it and
> submit that, if possible, because it is too error-prone.

Some weeks ago I had the same situation, two times within one week,
and I didn't find any other suitable solution.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning
AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig
 
Telefon: Potsdam: 0331-743881-0
E-Mail:  tschoening@am-soft.de
Web:     http://www.am-soft.de

AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow

Re: Restoring from old backup

Posted by Les Mikesell <le...@gmail.com>.
On 12/14/2010 9:09 AM, Andy Levy wrote:
> On Tue, Dec 14, 2010 at 09:34, Mauro Condarelli<mc...@mclink.it>  wrote:
>>   Hi,
>> This should be a FAQ, but I didn't find a proper answer, so here I am.
>>
>> I suffered a crash in my SVN server machine.
>> I had a slightly old version of the repository on my backup disks.
>> I have a few modified working copies.
>>
>> I restored the server and the repository.
>> All *seemed* ok, but, unfortunately, the latest version of saved repo was
>> 99, while the "current" in my working copies is 104.
>>
>> Now Subclipse (and TortoiseSVN) refuse to Submit my latest copy because
>> "version 104 does not exist".
>>
>> I understand I lost a few steps in the program history, but I would like to
>> salvage as much as possible.
>> What is the right incantation to achieve that?
>>
>> I would rather not checkout a fresh copy, move all changes to it and submit
>> that, if possible, because it is too error-prone.
>
> That is what you will have to do.

I'm not 100% sure, but I think 'rsync --delete -avC source dest' would 
copy the existing checked-out working copy that you want to become the 
new HEAD on top of a tree checked out from your restored backup.  The 
'-C' option is shorthand for a bunch of excludes that should keep it 
from copying over the metadata under .svn directories along with things 
that are typically build results.

-- 
   Les Mikesell
    lesmikesell@gmail.com

Re: Restoring from old backup

Posted by Andy Levy <an...@gmail.com>.
On Tue, Dec 14, 2010 at 09:34, Mauro Condarelli <mc...@mclink.it> wrote:
>  Hi,
> This should be a FAQ, but I didn't find a proper answer, so here I am.
>
> I suffered a crash in my SVN server machine.
> I had a slightly old version of the repository on my backup disks.
> I have a few modified working copies.
>
> I restored the server and the repository.
> All *seemed* ok, but, unfortunately, the latest version of saved repo was
> 99, while the "current" in my working copies is 104.
>
> Now Subclipse (and TortoiseSVN) refuse to Submit my latest copy because
> "version 104 does not exist".
>
> I understand I lost a few steps in the program history, but I would like to
> salvage as much as possible.
> What is the right incantation to achieve that?
>
> I would rather not checkout a fresh copy, move all changes to it and submit
> that, if possible, because it is too error-prone.

That is what you will have to do.