Hadithcore
Mishkat al-Masabih, 2710

Ibn ‘Umar said :

Is the <i>sunna</i> of God’s messenger not enough for you ? If any of you is detained from the pilgrimage he should perform the circumambulation of the House and go between as-Safa, and al-Marwa, then come right out of the sacred state and perform the pilgrimage the following year. He should sacrifice an animal, or fast if he cannot get any. Bukhari transmitted it.

وَعَن ابنِ عمَرَ أَنَّهُ قَالَ: أَلَيْسَ حَسْبُكُمْ سُنَّةِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ؟ إِنْ حُبِسَ أَحَدُكُمْ عَنِ الْحَجِّ طَافَ بِالْبَيْتِ وَبِالصَّفَا وَالْمَرْوَةِ ثُمَّ حَلَّ مِنْ كُلِّ شَيْءٍ حَتَّى يَحُجَّ عَامًا قَابِلًا فَيَهْدِيَ أَوْ يَصُومَ إِنْ لَمْ يَجِدْ هَديا. رَوَاهُ البُخَارِيّ

References1 variant
In-Book Reference
Book 10, Hadith 200