I love a nice, juicy backbend to relieve my back pain. During my first pregnancy back pain was a particular issue for me, so to provide relief I would often come into a deep backbend. How naughty I was(!), but in my defense I didn't know any better and I was not a student of yoga.
When I was taking those deep backbends I was exaggerating the lordosis of my lumbar spine, that's the arching of the lower back that we often see as a woman's pregnancy progresses. I was also putting my abdominal muscles at risk, stretching them too far and increasing my risk of abdominal separation (which I did have a minor case of in the end....more on how to prevent and repair that another day!).
We also often see increased kyphosis in the upper back of pregnant women, that's the rounding of the upper shoulders. Both of these changes in the body are a result of the increased muscular support that the growing baby needs.
When we look at the shape that a pregnant woman's body is making we can see that the only part of the body that needs to be bent back is the shoulder region. There are many safe ways to move that part of the body during pregnancy, and your yoga teacher will be best to guide you on that.
But, in my experience anyway, the bigger complaint is lower back pain. It is important to identify the cause of pain. Often it's simply a case of growing a human being and the enormous strain this places on your body, but sometimes there can be other things at play such as an unstable sacroiliac joint. Seek confirmation, especially if yoga is new to you, as you may be advised to perform modifications to poses.
Generally during a pregnancy class I focus on lengthening the spine. My favourites include coming to a right angle, cat pose and downward facing dog (unless inversions are unsafe for your pregnancy, again your teacher will be able to guide you). Bring a partner into the mix and have them gently pull back on the hips while you come to a right angle at the wall.
Very importantly, work with your body, your pregnancy and your experience. Experienced students of yoga may undertake poses that I would not advise for a new student. Simply enjoy learning new ways to move your body, different ways to connect with your baby, and trying different poses to relieve pregnancy ailments.