Sahih al-Bukhari, Volume 8, Book 78, Hadith 696 (USC-MSA)

Narrated `Abdullah bin `Umar: that he was asked about a man who had vowed that he would fast all the days of his life then the day of `Id al Adha or `Id-al-Fitr came. `Abdullah bin `Umar said: You have indeed a good example in Allah's Messenger. He did not fast on the day of `Id al Adha or the day of `Id-al-Fitr, and we do not intend fasting on these two days.

حَدَّثَنَا مُحَمَّدُ بْنُ أَبِي بَكْرٍ الْمُقَدَّمِيُّ، حَدَّثَنَا فُضَيْلُ بْنُ سُلَيْمَانَ، حَدَّثَنَا مُوسَى بْنُ عُقْبَةَ، حَدَّثَنَا حَكِيمُ بْنُ أَبِي حُرَّةَ الأَسْلَمِيُّ، أَنَّهُ سَمِعَ عَبْدَ اللَّهِ بْنَ عُمَرَ ـ رضى الله عنهما ـ سُئِلَ عَنْ رَجُلٍ، نَذَرَ أَنْ لاَ، يَأْتِيَ عَلَيْهِ يَوْمٌ إِلاَّ صَامَ، فَوَافَقَ يَوْمَ أَضْحًى أَوْ فِطْرٍ‏.‏ فَقَالَ لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ، لَمْ يَكُنْ يَصُومُ يَوْمَ الأَضْحَى وَالْفِطْرِ، وَلاَ يَرَى صِيَامَهُمَا‏.‏

sunnah.com