On Sun, Oct 10, 2021 at 2:03 AM Bo Berglund <bo.bergl...@gmail.com> wrote:
>
> I am running an Apache Subversion server on an oldish Ubuntu 18.04 LTS server
> and I have realized that rather than upgrading the Ubuntu installation to 
> 20.04
> I should move it to new harware (with Ubuntu Server 20.04 LTS).
>
> The existing server runs on 10 years old (at least) hardware so it is due for
> replacement.
>
> But this installation serves as a backup svn server for a main server in the
> company facilities in another location. The main server does an svnsync across
> the internet each night to keep the two repositories in step.
>
> So I figured the migration is a lot more complex than just taking a repository
> dump and then loading this into a new installation...
> Repository ID:s etc has to be maintained for example.
> The server handles 10 different rather big repositories used for different
> purposes with different aithentication of svn users.
>
> This setup was done back in 2017.
>
> Can I use rsync to move the binary repository files over from one computer to
> the other and then somehow tell the new svn where it is located?

The "Red Bean Book", is very good and goes into this sort of thing.


> On the existing server the repos are located in /var/lib/svn.
> So can I just rsync this tree between the two machines?

Mostly. Ensuring that usernames and permissions are consistent, and
that the old formats are compatible or updated to the new Subversion,
can require attention. If you have to run both at the same time, and
keep them in sync during the switchover, it needs attention.

> And how do I go about configuring the new svn that this is where the reopos 
> are?

The usual way is to use tools like "svn hotcopy"  and "svnsync" to set
them up as a master, and a slave, which you're already doing, to keep
them in sync, to keep servers in sync. Then stop write access to the
master, let svnsync catch up the slave, stop svnsync, and tell your
DNS to talk to the new master instead of the old one.

> I tried googling and found this, which outlines a move, but does not talk 
> about
> replicating users, connections, Apache integration etc:
>
> https://www.petefreitag.com/item/665.cfm

Well, yes. It's too flexible to completely script, because Apache has
gotten way, way too powerful and too flexible to simply "copy". Sure,
a simple setup can be copied, but people get cutesy with it: they set
up reverse proxies, LDAP and local authentication, filters for certain
filenames, complex privileges over branches and tags to enforce
specific workflows, failover behavior, maintenance pages, etc.

> Is this what I should do and how do I make sure the nightly svnsyncs will
> continue working?
>
> What about svn version differences?
>
> Info on my existing server version:
>
> /var/lib/svn$ svn --version
> svn, version 1.9.7 (r1800392)
>    compiled Mar 28 2018, 08:49:13 on x86_64-pc-linux-gnu
>
> The following repository access (RA) modules are available:
>
> * ra_svn : Module for accessing a repository using the svn network protocol.
>   - with Cyrus SASL authentication
>   - handles 'svn' scheme
> * ra_local : Module for accessing a repository on local disk.
>   - handles 'file' scheme
> * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
>   - using serf 1.3.9 (compiled with 1.3.9)
>   - handles 'http' scheme
>   - handles 'https' scheme
>
> The following authentication credential caches are available:
>
> * Plaintext cache in /home/bosse/.subversion
> * Gnome Keyring
> * GPG-Agent
> * KWallet (KDE)
>
> Grateful for advice / links to howto guides!
>
> (I will need to install Ubuntu server from scratch and then subversion and 
> then
> configure it all...)
>
> PS:
> Is it possible to just move the existing hard drive over to the new computer 
> and
> start it up? Or clone the content to the new computer's drive?
> I do have a lot of other stuff that needs migration too...

Maybe? You'd need to mount it, and a 10 year old hard drive is
questionable at best. I'd use rsync: Ensure that you have SSH access
from the new host to the old host, and you should be able to use rsync
to copy material and run svnsync efficiently. And look up "svn
hotcopy" for copying the basic Subversion configuration for copying
over to a new server.

>
> --
> Bo Berglund
> Developer in Sweden
>

Reply via email to