Martin Woods and Iain Hume put Rovers two goals to the good at the interval and substitute Chris Brown sealed a 3-1 victory after Richard Marshall pulled one back in superb fashion for the Conference North outfit.
Doncaster boss Dean Saunders said " I'm just relieved to get through it with no injuries because it was always going to be a potential banana skin. I knew it would be a difficult game because we had little to gain and everything to lose playing a non-league side.
"I thought they did very well but it relaxed us a bit when we went two goals up although they went and scored with a brilliant effort worthy of the Premier League which left us one mistake away from an upset and a replay."
He added: "I was glad we finished it off with the third goal but I thought they performed well and I think they will have a good season.
"We had a couple of players injured and lacked a bit of width but we got the job done and we just need to keep improving."