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

Re: Moving a repository via rsync

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Thu, 18 Jun 2009 10:44:01 -0500

Andy Levy wrote:
>> I need to move a Subversion repository from one host to another (A to B) and
>> once that is complete, shutdown A and then rename B to A (to preserve the
>> hostname, etc.). My first thought was to use svnadmin dump, transfer the
>> file, and then load with –force-uuid, however, this was painfully slow and I
>> got stopped by a checksum error on the load.
>> My question is, can I just shutdown access to the repository (no clients
>> reading/writing to it), and then rsync the repository over to the new
>> machine? It’s a lot faster than dump/load and I can’t currently see why
>> that won’t work just fine.
> Use svnsync to make the new server a mirror of the old, then shut down
> the old one. This way, people can keep committing to the old server &
> the transactions will be replayed on the new one automatically (as
> long as you set up svnsync in a post-commit hook), for minimal
> downtime.

I'd expect rsync to work as long as long as the source is consistent and
unchanged (and you might need a CPU type that is not wildly different at
the target). And at least with fsfs you should be able to rsync with
the source active to get the bulk of the data, then stop the service and
rsync again to quickly pick up the final changes (not sure if that needs
--delete or not). Theoretically, that should work with anything stored
in a filesystem and it's what I normally do when moving other services,
home directories, file stores, etc.

   Les Mikesell
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-18 17:45:05 CEST

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