Created
August 30, 2011 23:29
-
-
Save kenmickles/1182387 to your computer and use it in GitHub Desktop.
Quick script to migrate some old BDB Subversion repositories I had sitting around to FSFS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Quick script to migrate some old BDB Subversion repositories I had sitting around to FSFS | |
# All commands come from http://www.hermann-uwe.de/blog/migrating-bdb-svn-repositories-from-one-version-to-another-and-to-fsfs | |
if [ "$1" == "" ]; then | |
echo "Please enter the full repository path" | |
exit | |
fi | |
repo_path=`echo "$1" | sed 's#/*$##'` | |
old_version=4.6 | |
new_version=4.8 | |
# upgrade Berkeley DB version | |
cd ${repo_path}/db | |
db${old_version}_checkpoint -1 | |
db${old_version}_recover | |
db${old_version}_archive | |
svnlook youngest .. | |
db${new_version}_archive -d | |
# create backup of repo | |
mv $repo_path ${repo_path}.bak | |
# switch repository to fsfs | |
svnadmin dump ${repo_path}.bak > ${repo_path}.dump | |
svnadmin create --fs-type fsfs $repo_path | |
svnadmin load $repo_path < ${repo_path}.dump | |
rm ${repo_path}.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment