[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: New file svn-restore-dumps.py

From: Mark Stead <mark_at_stead.id.au>
Date: Tue, 17 Mar 2009 12:15:52 +1100

Hi Martin,

Thanks for your feedback. I haven't looked at your attachment yet - it
sounds complex though.

Can I clarify how you would get the dump 20-44 created.

I assume you are using svn-backup-dumps.py with "-c 20". You will get
multiple files, but they should only contain at most 20 revisions and start
at a multiple of 20.

For example, this is what I'm expecting to see when dumping at head rev is
35

   - Dump 0-19
   - Dump 20-35

Then continuing when head rev is 44

   - Dump 20-39
   - Dump 40-44

When restoring from these dumps it will use 20-39 in preference to 20-35
since it chooses the one with the highest end revision. This will work when
restoring into a new repository.

But it does give problems if you are restoring into a repository already at
revision 35 (ie one restored from a full backup). In this case there is no
way to restore revision 35 onwards without manually modifying the dump
files. This is why I made the "relative incremental" changes to
svn-backup-dumps.py.

Perhaps there may need to be operational restrictions - such as:

   - It is preferred to use "relative incremental" mode (-i) of
   svn-backup-dumps.
   - Use -c mode, but only if you don't vary the count value between dumps.
   - Using -c mode may limit your ability to restore into an existing
   repository. You should be able to restore into a new repository (if you
   have dumps from revision 0). Or if desperate you can edit a dump file to
   include only the revision range required.
   - Of course "full dump" and "single revision" dump modes should be fully
   supported.

2009/3/17 Martin Furter <mf_at_rola.ch>

> Almost perfect... ;)
>
> I found another problem. If you have the following dump files:
>
> rps.000000-000019.svndmp
> rps.000020-000039.svndmp
> rps.000020-000044.svndmp
> rps.000040-000059.svndmp
>
> It loads 0-19, 20-44, then fails because it can't find a dump file starting
> with revision 45.
>
> The attached version contains an enhanced scan_all_dump_files function. It
> creates a graph of all dump files from HEAD+1 up to the highest revision,
> then throws away all nodes which have only one or no connection. After that
> it chooses a path from HEAD+1 to HIGHEST and ignores redundant sub-paths.
>
> I hope you like it, though it's much more complicated.
>
> Martin

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1336604
Received on 2009-03-17 02:23:15 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.