Tuesday, October 6, 2009

Updating Subversion

Yesterday I went through the process of upgrading our soon to be used Subversion server, we are moving from VSS to SVN and the initial install of Subversion was done by our BuildMaster. I got asked to do the upgrade and bring things up to current versions and document the steps, so for posterity here they are.

Subversion installation used 1.6:
From Compatibility Concerns
  • Older clients and servers interoperate transparently with 1.6 servers and clients. However, some of the new 1.6 features may not be available unless both client and server are the latest version. There are also cases where a new feature will work but will run less efficiently if the client is new and the server is old.
  • There is no need to dump and reload your repositories. Subversion 1.6 can read repositories created by earlier versions. To upgrade an existing installation, just install the newest libraries and binaries on top of the older ones.
  • Subversion 1.6 maintains API/ABI compatibility with earlier releases, by only adding new functions, never removing old ones. A program written to the 1.0, 1.1, 1.2, 1.3, 1.4 or 1.5 API can both compile and run using 1.6 libraries. However, a program written for 1.6 cannot necessarily compile or run against older libraries.

Subversion upgrade process

o Turn off the Apache Service
o Prepare Subversion for upgrade (back-ups)
1. Zip up directories to keep a rollback in place
1. Back up the configuration files under Apache (can be done within the Zip file)
1. svnaccessfile
2. conf/httpd.conf
3. other stuff!
2. Move ZIP files to a new location as storage
o Upgrade Subversion
1. Unzip the upgrade
2. Move the binaries into place
1. Copy /bin directory to install location
2. Copy D:Program FilesSubversion inmod_dav_svn.so and mod_authz_svn.so to the Apache modules directory
3. Copy the /iconv directory to install location (this helps to update the version numbers for Subversion within the Apache footer - at least I think it did, my cache was acting up in FireFox)
o Upgrade Tortoise
1. Install Updated software package
o Reboot
o Create a new Repository:
1. Svnadmin create d:SourceControlSVNMAIN
o Test/Verify Upgrade
1. Connect using the Tortoise Repo-Browser from a remote machine
1. Connection should allow viewing of repository

Backup Process

Using FSFS as the database backend.
Criteria for the backup:
The process should run [nightly?? (this can be adjusted depending on how long it takes)] using Windows Scheduled Tasks.
Use the following command from a Windows Scheduled Task:
svnadmin hotcopy (repository path) (backup path)
The backup process will copy server configuration and hook scripts.
Keep the backups on an area that is backed up (get location from IT)
Is it possible to "share files" in SVN?
If you use the svn:externals –r option you can, but it seems SVN can only do directories not files
Security/branches:
· Authentication via AD
· Groups and user access defined in svnaccessfile
· We want to have two groups with users defined to each
· By default all Company group users will have all access; Consultant group users have access to only a branch (and possibly build stuff)
· Out of the gate just the trunk, all users edit there. More branches down the road.
Sites with additional information:
http://concise-software.blogspot.com/2009/02/instant-windows-svn-server-with-ssl-and.html

No comments: