Translation
(27) Pilgrims Prevented from Completing the Pilgrimage
كتاب المحصر
(1) Chapter: If one is prevented from 'Umra
(1) باب إِذَا أُحْصِرَ الْمُعْتَمِرُ
Sahih al-Bukhari 1809 

Narrated Ibn `Abbas:

Allah's Messenger (ﷺ) was prevented from performing (`Umra) Therefore, he shaved his head and had sexual relations with his wives and slaughtered his Hadi and performed Umra in the following year.

حَدَّثَنَا مُحَمَّدٌ، قَالَ حَدَّثَنَا يَحْيَى بْنُ صَالِحٍ، حَدَّثَنَا مُعَاوِيَةُ بْنُ سَلاَّمٍ، حَدَّثَنَا يَحْيَى بْنُ أَبِي كَثِيرٍ، عَنْ عِكْرِمَةَ، قَالَ قَالَ ابْنُ عَبَّاسٍ ـ رضى الله عنهما ـ قَدْ أُحْصِرَ رَسُولُ اللَّهِ صلى الله عليه وسلم فَحَلَقَ رَأْسَهُ وَجَامَعَ نِسَاءَهُ، وَنَحَرَ هَدْيَهُ، حَتَّى اعْتَمَرَ عَامًا قَابِلاً‏.‏
Reference : Sahih al-Bukhari 1809
In-book reference : Book 27, Hadith 4
USC-MSA web (English) reference : Vol. 3, Book 28, Hadith 36
  (deprecated numbering scheme)