Migrating SVN

Submitter: brinkley

Pre-migration SVN is on lamina, repository root is /usr/local/svnroot, access is via svn+ssh, as per http://trac.biostr.washington.edu/trac/wiki. This requires the user to be in group cvs, which is managed by LDAP, which we are trying to phase out since its so complex. Daily backups of the lamina repository are done by Bill Barker's backup scripts in crux.si.washington.edu, and are saved nightly to crux:/usr/local/backups/systems/lamina/svn/sig.svn.dump. The backup script that does this is in crux:/usr/local/backups/bin/siserversrsync.sh. Relevant command when HOST to backup is lamina is svnrdump dump svn+ssh://trac.biostr.washington.edu/src --quiet > $HOST/svn/sig.svn.dump. This runs the svn dump command on lamina, saving the dump on crux.

To migrate svn to synapse I followed the instructions in http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate, except that I scp'd the dump file on crux to synapse:/usr/local/src/svn. Thus, the current svn on synapse is a snapshot of the last backup file I copied. After the copy I ssh'd to synapse and created a new svn repository via svnadmin create /usr/local/repos/svnroot. I then loaded the dump file from crux via svnadmin load /usr/local/repos/svnroot < /usr/local/src/svn/sig.svn.dump. This creates a mirror of the lamina svn as of the last backup. The instructions make it sound like I can at any time copy the latest version of the dump file and load it into the existing synapse svn repo without re-creating a new one. Haven't tested this yet.

To make synapse svn writeable by me and others I followed the directions in http://www.startupcto.com/server-tech/subversion/setting-up-svn, which is also the way Joshua Franklin did it in our pre-migration svn on lamina. I created user brinkley, group sigusers, added brinkley to sigusers, see http://si.washington.edu/content/sysadmin.I then changed the newly created /usr/local/repos/svnroot to be owned by root.sigusers, with permissions 775,so any member of sigusers can write to svnroot. Created wrapper for svnserve to set umask so group sigusers can write to svnroot. Saved wrapper in /usr/local/src/svn/svnwrapper.sh, with a symlink to it from /usr/local/bin/svnserve -> /usr/local/src/svn/svnwrapper.sh. Can now remote access and write to svnroot on synapse via normal commands. Eg as noted in http://trac.biostr.washington.edu/trac/wiki/SubVersion.

TODO 2/13/19: svn on lamina is currently the production version. Need to redo the above procedure to load the last svnroot from lamina into synapse, then move production procedures to synapse.