[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: Radomir Zoltowski <radomir.zoltowski_at_s3group.com>
Date: Fri, 19 Jun 2009 09:48:42 +0100

I ususally use rsync this way:

> rsync -avn --delete-after SRC DEST && rsync -av --delete-after SRC
DEST && rsync -av --delete-after SRC DEST

1. -a does not imply any of the --delete* and you need it if you want
the repo cleanly transferred.
2. -n is a dry run, second run is the bulk one, third is final to check
if zero bytes has been transferred.
3. Read manual thoroughly on trailing / in SRC and DEST. You will get
lost, if you don't.
4. Optionally add -e SSH; I use SSH to do trasfers, unless transferring
5. Optionally add -z to compress, if transferring over a WAN link...


Les Mikesell wrote:
> 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.

The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications_at_s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-19 10:49:46 CEST

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