Ruzayq bin Hakim (may Allah have mercy on him) narrates from his father (may Allah have mercy on him) that he said: I asked Sa'id bin al-Musayyab (may Allah have mercy on him) about a shepherd with his sheep, or such a shepherd, who becomes junub (in a state of major ritual impurity) and between him and the water there is a distance of two or three miles: what should he do? Ibn al-Musayyab (may Allah have mercy on him) said: "Such a person should perform tayammum with clean earth."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 1105