Moving SVN repos

# move full repo

svndump /path/to/old-repository > full.dump
svnadmin create /path/to/new-repository
svnadmin load /path/to/new-repository < full.dump

# move only subproject from repo

svndump /path/to/old-repository > full.dump
cat full.dump | svndumpfilter --drop-empty-revs include subproject > subproject.dump
svnadmin create /path/to/new-repository
svnadmin load /path/to/new-repository < subproject.dump

Optional to remove ‘subproject’ top-level directory from subproject.dump

sed -i 's/Node-path: subproject\//Node-path: /g' subproject.dump
This entry was posted in Linux, SVN, Subversion. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">