Language:
كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(29)
Chapter: The Ghazwa of Al-Khandaq or Al-Ahzab Battle
(29)
باب غَزْوَةُ الْخَنْدَقِ وَهْىَ الأَحْزَابُ
Sahih al-Bukhari 4098

Narrated Sahl bin Sa`d:

We were with Allah's Messenger (ﷺ) in the Trench, and some were digging the trench while we were carrying the earth on our shoulders. Allah's Messenger (ﷺ) said, 'O Allah! There is no life except the life of the Hereafter, so please forgive the Emigrants and the Ansar."

حَدَّثَنِي قُتَيْبَةُ، حَدَّثَنَا عَبْدُ الْعَزِيزِ، عَنْ أَبِي حَازِمٍ، عَنْ سَهْلِ بْنِ سَعْدٍ ـ رضى الله عنه ـ قَالَ كُنَّا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي الْخَنْدَقِ، وَهُمْ يَحْفِرُونَ، وَنَحْنُ نَنْقُلُ التُّرَابَ عَلَى أَكْتَادِنَا، فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ اللَّهُمَّ لاَ عَيْشَ إِلاَّ عَيْشُ الآخِرَهْ، فَاغْفِرْ لِلْمُهَاجِرِينَ وَالأَنْصَارِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 4098
In-book reference : Book 64, Hadith 142
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 424
  (deprecated numbering scheme)