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

Leave a Reply

Your email address will not be published. Required fields are marked *