You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kai Hendry <he...@cs.helsinki.fi> on 2004/02/04 11:40:44 UTC

Debian upgrade

I upgrade to 0.37 on my client machine a day or two ago and I did
commits fine.

Then today I decide I should upgrade the server where my repo is
located.

I got:
Expected version '3' of repository; found version '2'
When I tried a commit from my client machine after the upgrade.

Oh great, so I check the changelogs which tells to check the NEWS:
** 0.35.1-1 : dump/reload required

What does that mean I wonder? I was running 0.34 before...

Anyway, after reading :
http://dabase.com/doc/subversion/book/book.html#svn-ch-5-sect-3.4
http://svn.collab.net/repos/svn/trunk/notes/repos_upgrade_HOWTO

It seems I have to dump with the older version of svn. Great! How do I
get an old version of svn back on my box? A force downgrade, but where
can I find the 0.34 .deb?

Then I remember I have a previous night's rsync backup of the repo at school,
which still runs 0.34. I can dump it there I think.

hendry@bogrund-17:~/dump$ svnadmin dump /home/fs/hendry/backups/backup-repo/ > dumpfile
svn: Unsupported repository version
svn: Expected version '3' of repository; found version '2'
hendry@bogrund-17:~/dump$ svn --version
svn, version 0.34.0 (r7859)
   compiled Dec  9 2003, 17:15:00

Er... how can that be? Have I screwed up my repo by committing with a 0.37 client?


Back on my server (where my repo is located):
hendry@bilbo:~$ cp -r repo/ backuprepotest
hendry@bilbo:~$ svnadmin recover backuprepotest/
Please wait; recovering the repository may take some time...
svn: Expected version '3' of repository; found version '2'
hendry@bilbo:~$ svnadmin recover backuprepotest
Please wait; recovering the repository may take some time...
svn: Expected version '3' of repository; found version '2'
hendry@bilbo:~$ svn --version
svn, version 0.37.0 (r8509)
   compiled Feb  2 2004, 00:26:09



Help.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Debian upgrade

Posted by Dave Rolsky <au...@urth.org>.
On Wed, 4 Feb 2004 kfogel@collab.net wrote:

> Kai Hendry <he...@cs.helsinki.fi> writes:
> > On Wed, Feb 04, 2004 at 01:12:01PM +0100, Jerome Lacoste wrote:
> > >   so.  You can use svnadmin-<old-version> to dump the repository.
> >
> > I missed this line.
> >
> > It would be nice if all the instruction were verbosely provided here.
> > It's only those three commands.
>
> This is in the FAQ; I don't have the exact URL here, but it's easy to
> find from the website.

Here's a script I wrote to automate this for me, as I have a number of
separate repos.

 #!/usr/bin/perl -w

 use strict;
 use File::Basename;
 use File::Path;

 my ($old, $new, $version) = @ARGV;

 die "Need old repo path, old repo version, and new repo path as arguments."
     unless $old && $new && $version;

 my $static_exe = "svnadmin-$version-1";
 my $path_to_exe = `which $static_exe`;
 chomp $path_to_exe;
 die "Cannot find $static_exe executable."
     unless -x $path_to_exe;

 foreach my $old_repo ( glob "$old/*" )
 {
     next unless -d $old_repo;

     my $mode = (stat _)[2];

     my $new_repo = "$new/" . basename($old_repo);

     unless ( -d $new_repo )
     {
	 mkpath( $new_repo, 1 );

	 # we really want to recreate the old permissions exactly.
	 umask 0000;
	 chmod $mode, $new_repo
	     or die "Cannot chmod $new_repo: $!";
     }

     system( "svnadmin create $new_repo" )
	 and die $!;

     system( "$static_exe dump $old_repo | svnadmin load $new_repo" )
	 and die $!;
 }


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Debian upgrade

Posted by kf...@collab.net.
Kai Hendry <he...@cs.helsinki.fi> writes:
> On Wed, Feb 04, 2004 at 01:12:01PM +0100, Jerome Lacoste wrote:
> >   so.  You can use svnadmin-<old-version> to dump the repository.
> 
> I missed this line.
> 
> It would be nice if all the instruction were verbosely provided here.
> It's only those three commands.

This is in the FAQ; I don't have the exact URL here, but it's easy to
find from the website.

Best,
-Karl


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Debian upgrade

Posted by Kai Hendry <he...@cs.helsinki.fi>.
On Wed, Feb 04, 2004 at 01:12:01PM +0100, Jerome Lacoste wrote:
>   so.  You can use svnadmin-<old-version> to dump the repository.

I missed this line.

It would be nice if all the instruction were verbosely provided here.
It's only those three commands.

Re: Debian upgrade

Posted by Jerome Lacoste <la...@frisurf.no>.
On Wed, 2004-02-04 at 12:40, Kai Hendry wrote:
> I upgrade to 0.37 on my client machine a day or two ago and I did
> commits fine.

You need to dump and restore your repository, the underlying DB has
changed.

Do something like

> svnadmin-0.33.0-1 your-repos > dump_file
> svnadmin create new-repose
> svnadmin load < dump_file

This was documented in the release notes of the new subversion.

jerome@dolcevita> zcat /usr/share/doc/subversion/NEWS.Debian.gz 
** 0.35.1-1 : dump/reload required

  The repository format changed in 0.34.0 (which was never packaged)
  so you'll need to dump and load your repositories.  See the section
  "Migrating a Repository" in the manual for instructions on how to do
  so.  You can use svnadmin-<old-version> to dump the repository.


I suggest you to install apt-listchanges, you will not have missed the
message.

Good luck

Jerome

Re: Debian upgrade

Posted by Kai Hendry <he...@cs.helsinki.fi>.
On Wed, Feb 04, 2004 at 02:03:15PM +0200, Tristan Seligmann wrote:
> Your repository should be fine; just dump with the 0.33 svnadmin, load, 
> and everything should work.

It worked, thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Debian upgrade

Posted by Tristan Seligmann <tr...@quotemaster.co.za>.
Kai Hendry wrote:
> It seems I have to dump with the older version of svn. Great! How do I
> get an old version of svn back on my box? A force downgrade, but where
> can I find the 0.34 .deb?

You don't need the 0.34 deb. The latest package contains a statically 
linked binary of svnadmin from 0.33, located at 
/usr/bin/svnadmin-0.33.0-1. You can use this to dump the old repository, 
then load with svnadmin.

> Er... how can that be? Have I screwed up my repo by committing with a 0.37 client?

Your repository should be fine; just dump with the 0.33 svnadmin, load, 
and everything should work.

-- 
Tristan Seligmann
Developer / Network Administrator
Quotemaster cc
Phone: +27 11 646 4008
Fax:   +27 11 646 7663


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org