I always have a backup guitar, but never have a backup bass. I always have an extra set of bass strings though.
I guess the fact that bass strings are so much harder to break makes me worry about it less.
Well, that and the fact that I only have one bass.
I usually will bring a second bass but leave it cased, because the odds of needing it are so minimal.
I am ashamed to say I have broken a bass string before though. Maybe once or twice in about 20 years.
If you break a bass string, though, one or more of the following is true:
a) you never/haven't change/d your strings;
b) there is something seriously wrong with your bass; or
c) there is something seriously wrong with how you're playing.
I guess a fourth possibility is that you get a defective string, but I've never had that happen. I rarely change strings, I'll admit.
On guitar, even though I don't do alternate tunings, I do always have at least one spare, out and on a stand. If the stage is big enough, I may have a second spare out, or maybe offstage and cased. I've actually broken strings on two guitars in practice and had to go to a third. Don't believe it's ever happened at a show. I'll admit to being bad about changing strings on guitar too. And during shows I can hit pretty hard. Yes, one of those doofuses who has found blood spatters on his guitar the next day, if I forget to wipe it down.
For a particularly "big" show I might break down and put a whole new set of strings on. That's rare though.