Why did Russia send troops to the border of Austria-Hungary in 1914?

Why did Russia send troops to the border of Austria-Hungary in 1914? Austria-Hungary had invaded Serbia, and Russia was in an alliance with Serbia. Austria-Hungary was threatening to invade Russia. Austria-Hungary was sending its people to live in Russia. Austria-Hungary needed help resisting a German invasion.