The Minstermen face the club against whom they finally lost their Football League status eight years ago at the Keepmoat Stadium during the week starting 13th August.
Their new League Two campaign begins the following Saturday, 18th.
“It’s a fantastic draw," striker Ashley Chambers told The Press.
“They’ve got a great stadium and are a big club who have just come down from the Championship.
"It will be a great occasion for our fans because it’s not far to travel and it’s a bit of a derby match really to start the season.”
Chambers has recently signed a new one-year deal at Bootham Crescent which increases into a second season based on number of appearances.
He scored ten goals during his full debut campaign after originally arriving from Leicester City on loan - including a tremendous strike in the play-off final victory against Luton Town at Wembley.