With (one's) back against the wall British phrase
The phrase can be rewritten as "with one's back to the wall".
Used to say that someone experiences a difficult or desperate situation, but has limited options or no easy solutions.
The flood left many people homeless, with their back against the wall.
Tracy has just lost her job for a few months. Now she finds herself with her back against the wall.
His company finally ended up with its back against the wall.
The phrase originates from a situation when a person is encountered with a fight with his back against the wall. Possibly in the military, and while he cannot get attacked from the back, he does not have a way of moving forward too without facing the enemy. The only option is to resist in the best possible way and fight until there is a verdict. The phrase dates from the 1500s.
To keep optimistic or have hope that something positive will occur and simultaneously prepare for a negative outcome
All I can do is hoping for the best and preparing for the worst.