The Dons moved into the next phase of the competition courtesy of a Neil McGregor own goal deep into injury time, in what was a great escape for Craig Brown's men.
The Aberdeen boss said he felt sorry for Dunfermline but was happy to finally get some luck for his players.
"I have a genuine sympathy for Dunfermline. I have the greatest regard for Jim McIntyre and Gerry McCabe, who played for me and was always a good pal," he said.
"I have a great deal of sympathy for Dunfermline but I'm very pleased for Aberdeen.
"We were bombarding their penalty box towards the end of the game and the attacks were incessant. Chris Maguire was very lively throughout the game and I think he deserved to create the goal.
"The goal may have gone in fortunately but we have had a lot of misfortune in the last three games and maybe I'm a bit biased but I think we deserved to win the game because of our superiority in the second half.
"We didn't create as many chances as we would have liked and there was certainly an element of fortune about the goal.
"We have played Celtic three times recently and not had one break so if we got a break today I think it was overdue."
Aberdeen set up a quarter-final meeting with St Mirren in Paisley on either March 12 or 13. The Dons have had the wood over the Saints in recent seasons, winning six and drawing twice in their past 10 meetings.