Sahih Muslim 1388 a
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
يُفْتَحُ الشَّامُ فَيَخْرُجُ مِنَ الْمَدِينَةِ قَوْمٌ بِأَهْلِيهِمْ يَبُسُّونَ وَالْمَدِينَةُ خَيْرٌ لَهُمْ لَوْ كَانُوا يَعْلَمُونَ ثُمَّ يُفْتَحُ الْيَمَنُ فَيَخْرُجُ مِنَ الْمَدِينَةِ قَوْمٌ بِأَهْلِيهِمْ يَبُسُّونَ وَالْمَدِينَةُ خَيْرٌ لَهُمْ لَوْ كَانُوا يَعْلَمُونَ ثُمَّ يُفْتَحُ الْعِرَاقُ فَيَخْرُجُ مِنَ الْمَدِينَةِ قَوْمٌ بِأَهْلِيهِمْ يَبُسُّونَ وَالْمَدِينَةُ خَيْرٌ لَهُمْ لَوْ كَانُوا يَعْلَمُونَ "
Sufyan b. Abd Zuhair reported Allah's Messenger (ﷺ) as saying:
Syria will be conquered and some people will go out of Medina along with their families driving their camels. and Medina is better for them if they were to know it. Then Yemen will be conquered and some people will go out of Medina along with their families driving their camels, and Medina is better for them if they were to know it. Then Iraq will be conquered and some people will go out of it along with their families driving their camels, and Medina is better for them if they were to know it.
Full reference and source
Sahih Muslim 1388 a In-book : Book 15, Hadith 568 USC-MSA web (English) : Book 7, Hadith 3200 (deprecated)
View source on Sunnah.com (opens in a new tab)