the blog/wiki/website/homepage/internetpräsenz of Stefan Rinner

Monday, Mar 5, 2012

learning after working 3 years in a huge enterprise: if an external service is down, in 99% of the cases it's our procurement dept. fault twitter

if you ever make the wise decision to stop hosting your development tools at your local/crappy hosting provider and instead start using atlassian ondemand these steps could be helpful when moving your svn repo

  1. dump your repo - if you don't have root access to that box use rsvndump (surprisingly sourceforge is still alive). If you want to dump it completly use rsvndump -v https://example.com/svn/ > svn.dump or use rsvndump -v --revision 7291:HEAD https://example.com/svn/ > svn7291.dump to dump everything after revision 7291
  2. if you don't want to import all your old projects you have to use svndumpfilter to remove everything you don't need cat svn.dump | svndumpfilter include --drop-empty-revs --renumber-revs search/ > filtered/search.dump
  3. the project folders in atlassian's svn have to match the project names set up in atlassian - e.g. we had to rename our /search/ to /SRCH/ use svn-dump-reloc for that cat filtered/search.dump | svn-dump-reloc search/ SRCH/ > rewrite/SRCH.dump
  4. after having filtered and renamed all your project you need to set up a local svn repo mkdir localRepo; svnadmin create localRepo
  5. import all your filtered and renamed dumps into that local repo cat rewrite/SRCH.dump | svnadmin load localRepo/
  6. dump that local repo svnadmin dump localRepo/ > final.dump gzp the resulting file and upload it
  7. that's it