Chapter 39: The Book of al-Bay'ah
It was narrated from Abu Sa' eed that: a Bedouin asked the Messenger of Allah about emigration (Hijrah). He said: "Woe to you, emigration is very important. Do you have any camels?" He said: "Yes. He said: "Do you pay Sadaqah on them?" He said: "Yes." He said: "Do righteous deeds no matter how far away you are from the Muslims, for Allah, the Mighty and sublime, will never cause any of your deeds tobe lost."
Sunan an-Nasa'i 4164