A handy command to verify all svn repositories

Somehow it happened that I'm looking after the SVN server in my company. Every now and again something happens to one or two repositories, but you never know which ones exactly. Unless developers complain. So to save me going through every repository, I've finally settled on this command...

Somehow it happened that I'm looking after the SVN server in my company. Every now and again something happens to one or two repositories, but you never know which ones exactly. Unless developers complain. So to save me going through every repository, I've finally settled on this command:

find /svn/ -maxdepth 1 -mindepth 1 -type d -exec echo {} \; -exec svnadmin verify {} \;

The command goes through every repository directory under /svn, prints its name and runs svnadmin verify on it. Why it needs to print the name is because on the broken repositories, the svnadmin verify will just hang. So at least I'll know which one to repair. Otherwise I could run something like this:

find /svn/ -maxdepth 1 -mindepth 1 -type d -exec echo {} \; -exec svnadmin repair {} \;

This entry has no pings

Trackback URL : http://qoob.net/blog/trackback/4