iCloud backup fails on iOS 6
That's the kind of thing software updates typically fix. Since it's an iPhone 5, you could try updating to iOS 8.4.1 today, or wait until iOS 9.0 launches in a couple of weeks. Just go to Settings->General->Software Update. I can't guarantee that updating will solve your problem, but you should update anyway for many reasons: new and better design, new features, bug fixes, security updates, and many other things.