LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-16-2008, 06:49 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Rep: Reputation: 51
Replicating SVN?


Can we perform the SVN replication from one of RHEL Machine to the another. Can we keep both servers in sync?

Pls Advise.
 
Old 12-16-2008, 06:54 AM   #2
Linux_champ
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
yes u can do it. i am using rsync for this purpose and it works with crontab. here it is...

00 15 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.100:/usr/local

i have added it to run on multiple times. hope this will work for u.
 
Old 12-16-2008, 07:04 AM   #3
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Great hearing those positive approach.
Can you explain in detail what I need to do for the setup?
I have a repository called svnrepo running under /home/rsxh directory.
What settings to another system I need to have?

Have yu got any steps for the same?Pls Help
 
Old 12-16-2008, 07:04 AM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Great hearing those positive approach.
Can you explain in detail what I need to do for the setup?
I have a repository called svnrepo running under /home/rsxh directory.
What settings to another system I need to have?

Have yu got any steps for the same?Pls Help
 
Old 12-17-2008, 01:09 AM   #5
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 668

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by Linux_champ View Post
yes u can do it. i am using rsync for this purpose and it works with crontab. here it is...

00 15 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.100:/usr/local

i have added it to run on multiple times. hope this will work for u.
If during rsync svn will write to repository - i expect nothing good (

There is another solution - program svnsync (part of the svn package)
It able forward each commit to the mirror svn server when commit is done.
 
Old 12-17-2008, 08:30 AM   #6
Linux_champ
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by Valery Reznic View Post
If during rsync svn will write to repository - i expect nothing good (

There is another solution - program svnsync (part of the svn package)
It able forward each commit to the mirror svn server when commit is done.
i havn't tried svnsync... may be it works better... but i am using rsync for last 1.5 years and didn't face any problem...


there is nothing to do on backup server.

rsync is installed by default on a RHL server. you just need to schedule it in crontab of primary server to run on different times. i have scheduled it to run after each 3 hours.

00 09 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 12 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 15 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 18 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 21 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local

rsync copies the modified files from source to destination folder. b/w root (or any other users that u use) should be able to login on other server without password...(trusted host)

Cheers!!!

Champ
 
Old 12-17-2008, 08:50 AM   #7
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 668

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by Linux_champ View Post
i havn't tried svnsync... may be it works better... but i am using rsync for last 1.5 years and didn't face any problem...


there is nothing to do on backup server.

rsync is installed by default on a RHL server. you just need to schedule it in crontab of primary server to run on different times. i have scheduled it to run after each 3 hours.

00 09 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 12 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 15 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 18 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local
00 21 * * * /usr/bin/rsync -arv -e ssh /usr/local/svn-repo root@192.168.0.200:/usr/local

rsync copies the modified files from source to destination folder. b/w root (or any other users that u use) should be able to login on other server without password...(trusted host)

Cheers!!!

Champ
While rsync can be used too, I like svnsync better.
- if "main" SVN server crashed, than up to 3 hours of commits can be lost, using rsync method
With svnsync - each commit immediately transferred to remote server, so in worse case only this one could be lost.

- In case of big repositories rsync can be rather expensive.

- If repository on "main" SVN server became corrupted, rsync will duplicate it to the backup server
 
Old 12-18-2008, 12:10 AM   #8
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Great to hear that..
Now I need some advise.

I have SVN Working on my RHEL Machine(Server1). I have configured WebDAV.Users read,checkout and been accessing the Repository.
Now I want to make the SVN Replication from master to slave(Server2).
Main AIM: Server1 is placed in US and Server2 is in India.This is needed so that colleagues in India neednt to be dependent on uk server.They can comit and modify in india and that too has to be synched to UK.

Is it possible?
Does I need to make any modification to server1. What steps I need to follow up for Server2?
As around of users are connected and accessing the Server1 I need your advise if I need any downtime or simply going through Server2 where SVN is Installed can do the trick.

Pls help me with steps as I am going to preform on Live Server.

Last edited by your_shadow03; 12-18-2008 at 01:21 AM.
 
Old 12-18-2008, 03:50 AM   #9
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 668

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by your_shadow03 View Post
Great to hear that..
Now I need some advise.

I have SVN Working on my RHEL Machine(Server1). I have configured WebDAV.Users read,checkout and been accessing the Repository.
Now I want to make the SVN Replication from master to slave(Server2).
Main AIM: Server1 is placed in US and Server2 is in India.This is needed so that colleagues in India neednt to be dependent on uk server.They can comit and modify in india and that too has to be synched to UK.

Is it possible?
Does I need to make any modification to server1. What steps I need to follow up for Server2?
As around of users are connected and accessing the Server1 I need your advise if I need any downtime or simply going through Server2 where SVN is Installed can do the trick.

Pls help me with steps as I am going to preform on Live Server.
If I understand correct, you want to have two independent developers groups and want each one of them use their own SVN server and keep those servers in sync.

I think it's logically impossible:
Let's say developers from each group modified (in different ways) and checked in same file.
How this should be sync'ed ?

I think you have two choices:
1) Work with one SVN server
2) Switch from centralized version control to distributed (like Mercurial or git)

Valery
 
Old 12-18-2008, 05:47 AM   #10
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Valery,

Let me explain you in brief. You are right there is only One Main Centralized SVN Server.
What We were facing problem is : Everytime developers in India have to reach out UK SVN(This is a centralized server there).That takes most often connectivity problem or running slow.
What we need is Sync that server to our India Server and work herein.
Internally We developers will connect to India Server which is Synched to UK.

That will probably lessen the time for accessing plus no overload on the server too.
 
Old 12-18-2008, 06:11 AM   #11
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 668

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by your_shadow03 View Post
Valery,

Let me explain you in brief. You are right there is only One Main Centralized SVN Server.
What We were facing problem is : Everytime developers in India have to reach out UK SVN(This is a centralized server there).That takes most often connectivity problem or running slow.
What we need is Sync that server to our India Server and work herein.
Internally We developers will connect to India Server which is Synched to UK.

That will probably lessen the time for accessing plus no overload on the server too.
So you mean, that ALL commits will be done to India server and UK server will be used only as backup/read-only server ?

If yes you can do as described here:
http://svnbook.red-bean.com/en/1.5/s...nt.replication
 
Old 12-18-2008, 11:49 PM   #12
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Original Poster
Rep: Reputation: 51
May I know what is the right format?

Code:
[root@localhost ~]# svnsync initialize svn://localhost/root/svn-mirror svn://10.14.232.110/svn-mirror --sync-username syncuser --sync-password syncpasswd 

svnsync: invalid option: --sync-username
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy svn working dir without svn hidden dirs and files? erinspice Linux - Software 4 03-29-2011 06:58 PM
anon svn read-only over apache: '.svn/entries': No such file hedpe Linux - Software 2 04-29-2009 06:31 AM
DNS not replicating rbblue Linux - Networking 1 05-01-2008 05:43 PM
svn checkout -bash svn command not found Anauj0101 Linux - Newbie 6 04-20-2008 06:50 PM
Replicating files between servers. cpgeorge Linux - Networking 6 12-10-2004 11:07 AM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration