The Prophet ﷺ prayed at Mina the prayer of a traveler, as did Abu Bakr and Umar, and Uthman for eight years, or he said six years.Hafs said, Ibn Umar used to pray two rakahs at Mina and then go to his bed.I said, "Uncle, what if you prayed two more rakahs after it?"He replied, "If I did that, I would be completing the prayer in full."
صلى النبي ﷺ بمنى صلاة المسافر وأبو بكر وعمر وعثمان ثماني سنين أو قال ست سنين. قال حفص: وكان ابن عمر يصلي بمنى ركعتين، ثم يأتي فراشه، فقلت: أي عم لو صليت بعدها ركعتين. قال: لو فعلت لأتممت الصلاة.
Muslim narrated it in "Prayer of the Traveler" (694:18) from Ubaydullah bin Muaz, who said, our father narrated to us, who said, Shubah narrated to us, from Khubayb bin Abdul-Rahman, who heard Hafs bin Asim, from Ibn Umar, and he related it.