Personally, what I do when I am re-installing OS X is just drag the "iTunes" folder from the Music directory onto an External disk. When I am done installing OS X, I re-install iTunes, replac the empty folder it creates with the one I copied over to my Extenral HDD, and all is good again

Just got to make sure you dont forget to copy the "iTunes Library" and "iTunes Music Library.xml" files along eith the files.
There may be better ways, but I can't imagine anything easier than clicking and dragging a folder.
For backing it up on disc, the procudure would be the same, except that you may have to do it in chunks, spanning the library over a few discs.