There can be many other reasons for back pain bit as per your details upper n lower back both are giving u problem then your paraspinal muscles which run parallel to your spine also other back muscles r weak.
Next Steps
start doing back strengthening exercises under guidance.
Health Tips
heating will give relief.