When you are approaching the battle, the priest shall come near and speak to the people. He shall say to them, ‘Hear, O Israel, you are approaching the battle against your enemies today. Do not be fainthearted. Do not be afraid, or panic, or tremble before them, for the LORD your God is the one who goes with you, to fight for you against your enemies, to save you.’ The officers also shall speak to the people, saying, ‘Who is the man that has built a new house and has not dedicated it? Let him depart and return to his house, otherwise he might die in the battle and another man would dedicate it. Who is the man that has planted a vineyard and has not begun to use its fruit? Let him depart and return to his house, otherwise he might die in the battle and another man would begin to use its fruit. And who is the man that is engaged to a woman and has not married her? Let him depart and return to his house, otherwise he might die in the battle and another man would marry her.’ Then the officers shall speak further to the people and say, ‘Who is the man that is afraid and fainthearted? Let him depart and return to his house, so that he might not make his brothers’ hearts melt like his heart.’ When the officers have finished speaking to the people, they shall appoint commanders of armies at the head of the people.Deuteronomy 20:2-9
This is a rather curious passage in that the Bible does not seem to put dying for Israel to be at the top of the list of priorities. Rather, they have other duties in their sphere of life, e.g. their own household, before they are expected to serve their country in war.
Coupled with Jesus’s advice that when a king faces a larger army the wise thing to do is to ask for the terms of peace, one gets the sense that pre-modern wars were not “total wars”, in that no one was expected to sacrifice all for their country or its independence.