As in usual life at our place as well we have to deal with every sort of work with out considering any boundaries to our role or designation, only then we feel we are doing something productive (productive is the term that keeps any person alive
, am I true?).
Generally, I like working with various departments, at various levels, doing various things (even not related to my mainstream development work in Java/ WebObjects… this is true… now-a-days am working in PHP as well, server-side work – I have been doing from so long and I like it very much
)
Okay, coming to our main subject today, recently I have dealt with migrating Subversion from Microsoft Windows Exchange Server to Apple Mac OS X Tiger machine. Initially, I was worrying if I could do it. Luckily, I had one of my best colleague, Saju Cyriac, from my earlier company Effigent India Pvt Ltd., who gave me support in doing this.
Thanks a lot to Saju
I just followed below steps to migrate Subversion from Windows machine to Apple Mac OS X machine:
1) Take a dump of Subversion in the windows system to a location in the system, by following below steps:
a) Create folder in the C: drive, for eg: SubversionBackup
b) Open Command prompt (Start -> Run -> type cmd in the box and press enter)
c) Do you know the location of Subversion repository installed in Windows machine? If not, please try this:
c1) Execute svnservice -debug command in the Command Prompt.
c2) Executing this command should output some debugging log to the console, here look for svnserve.exe word and capture the last argument of this svnserve.exe command, which should be the location of Subversion repository in this machine.
d) Now, having location of Subversion repository (assume it is, C:\svnrepo), start taking the Subversion dump by executing following command in the Command Prompt:
svnadmin dump C:\svnrepo > C:\SubversionBackup\svnrepo_windows_dump.dumpfile
In few moments above command creates dump of Subversion repository in the C:\SubversionBackup\svnrepo_windows_dump.dumpfile file. Great!!!
2) Now, to load (migration of Subversion) the above Subversion repository dump to Apple Mac OS X machine, make sure you have installed and configured Subversion (http://subversion.tigris.org/). Ensuring Subversion is installed in the Mac machine, follow below steps to setup Subversion repository in the Mac machine, Open a Terminal to start:
a) Create Repository: execute below command in the terminal, choose a name for the repository -
svnadmin create /svnrepo
b) Create a Subversion User:
b1) vi /svnrepo/conf/svnserver.conf and add the below lines at appropriate location/ or if they exist already uncomment them:
anon-access = none
auth-access = write
password-db = passwd
b2) Create a password file:
vi /svnrepo/conf/passwd
In this file add a line for your user, in the following format:
# add users in the format: user = password
tony = mypassword
c) Load your Subversion repository dump, execute the following command in the terminal: [before executing this step you should have transferred the Subversion repository dump file (compressed, for safety) from Windows machine to Mac machine]
svnadmin load /svnrepo < /svnrepo_windows_dump.dumpfile
WOW!!! that is coool. You have migrated Subversion from one machine to another.
3) Start SVN server as daemon, execute below command in the terminal:
svnserve -d
4) Now, try checkout code from new Subversion repository, for eg, execute below command in the terminal:
svn co svn://<New Subversion machine IPAddress>/svnrepo/MyProject
Since we set anon-access to none you should be prompted for username and password which you created in the file /svnrepos/conf/passwd.
5) To configure Subversion to restart automatically upon Mac OS X Tiger machine reboot, follow below steps: [below content taken from http://www.kashum.com/blog/1217783696]
So, to start svnserve automatically, create the file/Library/LaunchAgents/org.tigris.subversion.svnserve.plist, and put the following in it:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.tigris.subversion.svnserve</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svnserve</string>
<string>--inetd</string>
<string>--root=/Users/defaultuser/svn</string>
</array>
<key>ServiceDescription</key>
<string>Subversion Standalone Server</string>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<array>
<dict>
<key>SockFamily</key>
<string>IPv4</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
<dict>
<key>SockFamily</key>
<string>IPv6</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
</array>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>
This automatically starts the server when it boots. It also switches it from a standalone daemon to running under inetd, but it makes no real difference. There are a lot of different versions of this plist out there, but this is the only one I got to work.
DONE. You have successfully migrated Subversion and configured it to restart automatically upon server reboot.
‘N’joy