This simple perl script allows you to dump the contents of your kernel routing database. It also supports clearing the table. The dump can be used as a shell script that restores the original state of the table.
Not much more to say, get it here.
No warranty and stuff.
Do you find this useful? Think I'd better put some more features into it? Found a bug? Tell me. You know where to find me.