The movement involved in riding a bike is good for the whole body – including the back. At least if we observe a few key aspects when cycling. The linked pages tell you what really matters for back-friendly cycling.
If health reasons prevent you from cycling, perhaps you should consider a stepper bike. It combines the advantages of cycling and running, while the upright posture used for cycling is kinder to your back and joints than sitting on a bike.