The Russian Ukrainian war reminds me of Sino-Vietnamese war.
Not much talked about in English on the web, the only one I found is an article rejecting the comparison by the diplomat.
In the article, the author acknowledged that many Vietnamese see the comparison appropriate, but the author rejects it on the ground that USSR and Vietnam was in a military alliance like NATO that would oblige USSR to defend Vietnam by attacking China.
I looked around the internet and could not find the legal text of the treaty which is named "Treaty of Friendship and Cooperation". However I found a research paper by US Naval Postgraduate School dated 1980 here
The paper does not list the legal text, but in page 75 it explained the concerned military natural of the treaty, article 6. Here I quote,
With regard to military assistance and presence, Vietnam's Army Chief of Staff, General Van Tien Dung stated that "the Vietnam-USSR treaty of friendship and cooperation has been developing its effect." Soviet Vice-Foreign Minister Nikolai Firyubin called the visit of Soviet warships to Vietnamese ports as "a duty of the Soviet-Vietnamese treaty." Both statements refer to Article 6 of the treaty that calls on consultations and appropriate measures to eliminate a threat to the security and peace of the two parties
These texts are similar to what Russian Chinese agreement today, calling for consultation and appropriate measure WITHOUT legally binding actions of direct military involvement.
These texts also reject the article from "thediplomat" that asserts that there was a legal obligation to USSR towards Vietnam. I think the author maybe need to really find the copy of the treaty.
So here is my thought, the two wars are very similar in many ways.
Vietnam and USSR was in a close relationship that was military alliance in effect but NOT in law. Ukraine is in advanced relationship (enhanced opportunity partnership), Ukraine has NATO military on its soil in another name just like USSR had soviet military advisers on Vietnamese soil and warship visits to its port.
China decided to "teach a lesson" and called the USSR bluff of its commitment by an invasion. Russia decided to draw the red line for Ukraine and call NATO bluff.
Some people including the article argued that China refrained her scope because of fear of USSR attack to the north due to the treaty which is different to today because Ukraine is not NATO member. But the fact is that neither Ukraine is NATO member nor was Vietnam a Warsaw Pact member. So China's preparedness for potential USSR intervention wasn't because of some paper. So is Russia's nuclear "threat" to NATO a sincere sense of potential intervention, unrelated to any legal wording on a paper.
Similar to China's move back then, there is a very high chance that Russia's action is not total annihilation and occupation of Ukraine as a country, but a move with limited objective focused on preventing Ukraine's NATO membership (like Vietnam becoming a Warsaw pact member).
The only difference is that today, Russia does want to break Donbass region away from Ukraine due to its ethnic composition while China couldn't.
However high similarity is not exact mirror, so I will not go any further in details.
A funny fact is that, in case of Sino-Vietnamese war, most western countries were "Neutral" like China today by calling both China to withdraw from Vietnam and Vietnam to withdraw from Cambodia. The Soviet block only called on China to withdraw from Vietnam. History just repeat itself but swapping actors and changing stage.