I have strained upper and lower back. Lowerback is worse, knocks form off on other exercises if you try and train around it even... it also takes longer in my experience to heal . I have had an issue with upperback that takes a couple of days at most, and could still train, but lower back I have been several weeks with a problem maybe several days completely off the gym and had to cut back on ab work for longer.
In the past ,the standard treatment for a lower back strain, was complete rest,lying on a hardfloor as much as possible. I actually find being active ,but not going to the gym and lifting ,helps to quicken recovery. So don't just lie around thinking it will make it better quicker.
Yes stretching is important as is a light circuit either using your bodyweight, or weights, What I do to warm up, is 25 bench press,with 50 percent what I normally lift, 25 pulldowns, again 50 percent of what I normally do, 25 bodyweight squats and 25 bent over twists 25 each side (don't attempt this until your back is 100 percent). That little circuit covers all muscles more or less, I do that before stretching,
Also watch your form on exercises, and take some time to build up to using heavy weight, your ego means fukk all in the gym if you do something impressive and are then laid up for weeks. Not accusing anyone of this, but someone I know an experienced lifter who competed in regional bodybuilding contests,so he has zero excuse , decided to impress a load of younger guys ,with the amount of weight he could t bar row, and he completely fukked his back and he now is using the kind of weight, our two female members use for his back.