Project/Section Title

Overview

 

Resources

 Here are the commands I used to restore a subversion repository after a filesystem error caused a corrupt revision.


	subversion server error:

		Can't set position pointer in file '/var/subversion/owner/db/revs/0/48': Invalid argument

		fix:

			https://spin.atomicobject.com/2015/10/06/svn-corruption-recovery/ll



--------------------------------------------------
commadn used to restore from this error.  in this case only revison 48 was bad/corrupt.


2441  sudo chown -R www-data.root owner-restore/
2442  ll
2443  sudo mv owner/ owner-currupt-48-rev/
2444  ll
2445  mv owner-currupt-48-rev/ doh/
2446  sudo mv owner-currupt-48-rev/ doh/
2447  ll
2448  mv owner-restore/ owner/
2449  sudo mv owner-restore/ owner/
2450  history 
2451  exit
2452  cd /var/subversion/
2453  ll
2454  clear
2455  svnadmin verify owner/
2456  ll
2457  svnadmin dump owner/ > owner.dump
2458  sudo svnadmin dump owner/ > owner.dump
2459  sudo svnadmin dump owner/ > sudo owner.dump
2460  svnadmin dump owner/ > sudo owner.dump
2461  ll
2462  sudo mkdir doh
2463  chown luke.luke doh/
2464  sudo chown luke.luke doh/
2465  clear
2466  svnadmin dump owner/ > doh/owner.dump
2467  ll doh/
2468  svnadmin dump --incremental -r 49:HEAD owner/ >> doh/owner.dump
2469  ll /var/subversion/owner/
2470  ll /var/subversion/owner/db/
2471  ll /var/subversion/owner/db/revs/
2472  ll /var/subversion/owner/db/revs/0/
2473  ll
2474  sudo mkdir owner-restore/
2475  sudo svnadmin create owner-restore/
2476  ll
2477  cat doh/owner.dump | svnadmin load recoveredrepo
2478  cat doh/owner.dump | svnadmin load owner-restore/
2479  cat doh/owner.dump | sudo svnadmin load owner-restore/
2480  exit
2481  ll
2482  sudo service apache2  stop
2483  clear
2484  sudo service apache2  start




-------------------------------


and the command to find what was as lost in the corrupt revisions:

diff -r -x .svn beto-land-owner-first/ beto-land-owner/			



that command gave the following results:

roberto@fisto:~/Versioning/owner
$ diff -r -x .svn beto-land-owner-first/ beto-land-owner/ | grep -v DS_Store | grep -v Thumbs.db
Only in beto-land-owner-first/Resume/2007: 2007.01.a
Only in beto-land-owner-first/School/utsa/spring2005/CompOrgII: add.a
Only in beto-land-owner-first/Websites/oneweb/electronics-onebeartoe-org: nbactions.xml
diff -r -x .svn beto-land-owner-first/Websites/oneweb/electronics-onebeartoe-org/src/main/webapp/WEB-INF/jsp/signs/light-signals/index.jsp beto-land-owner/Websites/oneweb/electronics-onebeartoe-org/src/main/webapp/WEB-INF/jsp/signs/light-signals/index.jsp
25c25,37
<                                         
---
>                     
>                     
>                     
> Allerta Stencil
> Black Ops One Regular
> Emblema One Regular
> Kenia Regular
> Plaster Regular
> SirinStencil Regular
> Stardos Stencil Regular
> Trocchi Bold-Stencil
> Wallpoet Regular
>                     
Only in beto-land-owner-first/Websites/oneweb/electronics-onebeartoe-org: target Only in beto-land-owner-first/Websites/oneweb/onebeartoe-com/src/main/webapp: filesystem Only in beto-land-owner-first/Websites/oneweb/onebeartoe-net: nbactions.xml Only in beto-land-owner-first/Websites/oneweb/onebeartoe-net: target Only in beto-land-owner-first/Websites/oneweb/onebeartoe-org: nbactions.xml Only in beto-land-owner-first/Websites/oneweb/onebeartoe-org: target
So luckily only a clean up commit (49) was lost in the restoration.




back    |    top