I know what Russia should have done BY INTERNATIONAL LAWS - when Georgia attacked S.Ossetia, Russia should've called UN, EU and assume Georgia in killing innocents WITHOUT doing anything. There certainly would have been some UN discussions, some days that would decide the problem for a long time as it is always. And Russia should have not use any force to Georgia... but the problem is that if that's this way - all of the South Ossetians would have been killed by americanized Georgian troops (I would like to tell you that there were conflicts between ossetians and georgians all the time, the last one was in 1992 when georgians were killing ossetians and that's why Russian peacekeepers have been sent there and Ossetia were divided in two parts), these two nations ( Georgians and Ossetians) hate each other and I ensure you that south ossetians would have been killed almost completely before UN would take any real decision. And it's clear that Georgian troops are with the help of USA, all the world knows it, and that's the reason why the decision of this problem would have been not very serious for Georgia as it should be for such fascist actions.
Russians aren't fools , they knew that there would be two ways
1) go into pro-American UN and lwait for a long time and lose thousands of it's citizens in S. Ossetia and the respect of their own nation because it would show that Russia can't protect it's people even from such a small country like Georgia.
2) counterattack Georgia, kick it's troops out of South Ossetia and however lose some thousands of South Ossetians, but not the whole South Ossetian nation, and what's much more important - to prove Russian citizens that their country can protect them from outside aggression and get problems with pro-American government of Georgia, what means the same as have problems with America.
Russian government clearly understand that and their choice was the second way. Because it's better to show itself as a strong country that will not let any agressors be unpunished than a country that can be f*cked by anyone. Russians are proud of their country.