You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Joe Bell <jo...@prodeasystems.com> on 2009/06/18 15:00:12 UTC
Moving a repository via rsync
Hi all:
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.
Thanks,
Joe
This message is confidential to Prodea Systems, Inc unless otherwise indicated
or apparent from its nature. This message is directed to the intended recipient
only, who may be readily determined by the sender of this message and its
contents. If the reader of this message is not the intended recipient, or an
employee or agent responsible for delivering this message to the intended
recipient:(a)any dissemination or copying of this message is strictly
prohibited; and(b)immediately notify the sender by return message and destroy
any copies of this message in any form(electronic, paper or otherwise) that you
have.The delivery of this message and its information is neither intended to be
nor constitutes a disclosure or waiver of any trade secrets, intellectual
property, attorney work product, or attorney-client communications. The
authority of the individual sending this message to legally bind Prodea Systems
is neither apparent nor implied,and must be independently verified.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363227
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Moving a repository via rsync
Posted by km...@rockwellcollins.com.
Joe Bell <jo...@prodeasystems.com> wrote on 06/18/2009 10:28:01 AM:
> Thanks for that possibility as well Andy. Downtime is no concern
> however and the receiving host is already set up with everything it
> needs except the repository directory itself (i.e., all the hooks
> are moved over, Apache configuration, databases, viewvc, SVN 1.6,
> etc.) - As I mentioned I can't see any reason why rsync (or even tgz
> the repo) wouldn't work.
I rsync repos all the time (minus some of the temp directories).
However, this is always between the same OS, CPU architecture,
and svn version.
Kevin R.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363245
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Moving a repository via rsync
Posted by Joe Bell <jo...@prodeasystems.com>.
Thanks for that possibility as well Andy. Downtime is no concern however and the receiving host is already set up with everything it needs except the repository directory itself (i.e., all the hooks are moved over, Apache configuration, databases, viewvc, SVN 1.6, etc.) - As I mentioned I can't see any reason why rsync (or even tgz the repo) wouldn't work.
Joe
-----Original Message-----
From: Andy Levy [mailto:andy.levy@gmail.com]
Sent: Thursday, June 18, 2009 10:24 AM
To: Joe Bell
Cc: users@subversion.tigris.org
Subject: Re: Moving a repository via rsync
On Thu, Jun 18, 2009 at 11:00, Joe Bell<jo...@prodeasystems.com> wrote:
> Hi all:
>
>
>
> 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.
This message is confidential to Prodea Systems, Inc unless otherwise indicated
or apparent from its nature. This message is directed to the intended recipient
only, who may be readily determined by the sender of this message and its
contents. If the reader of this message is not the intended recipient, or an
employee or agent responsible for delivering this message to the intended
recipient:(a)any dissemination or copying of this message is strictly
prohibited; and(b)immediately notify the sender by return message and destroy
any copies of this message in any form(electronic, paper or otherwise) that you
have.The delivery of this message and its information is neither intended to be
nor constitutes a disclosure or waiver of any trade secrets, intellectual
property, attorney work product, or attorney-client communications. The
authority of the individual sending this message to legally bind Prodea Systems
is neither apparent nor implied,and must be independently verified.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363241
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Moving a repository via rsync
Posted by Radomir Zoltowski <ra...@s3group.com>.
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
locally.
5. Optionally add -z to compress, if transferring over a WAN link...
Radomir
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@s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363449
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Moving a repository via rsync
Posted by Les Mikesell <le...@gmail.com>.
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
lesmikesell@gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363243
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Moving a repository via rsync
Posted by Andy Levy <an...@gmail.com>.
On Thu, Jun 18, 2009 at 11:00, Joe Bell<jo...@prodeasystems.com> wrote:
> Hi all:
>
>
>
> 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.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2363236
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].