Stock's move re-unites him with former Bournemouth team-mate Eddie Howe after the pair, and assistant manager Jason Tindall, previously played together at Dean Court.
Howe told the club's official website: "Brian is a very good footballer who will suit how we play.
"He is someone we admired for a long time. He had a really good career at Doncaster and I thought he was impressive in the games he played against us over the past couple of years.
"Experience and leadership are two things we haven't got a great deal of and I certainly think he will add in those two areas."
Winchester-born Stock spent the first seven years of his professional career with the Cherries, with most of his 172 appearances coming under former manager Sean O'Driscoll.
A move to Preston in January, 2006 didn't work out for the Wales international but after joining forces again with O'Driscoll at Doncaster in September, 2006 - turning the move permanent four months later - Stock re-established himself.
He was a key part of the Rovers side that won promotion to the Championship via a play-off final win over Leeds United in 2008 and he was an integral part of the south Yorkshire club's four-year stay in the Championship.
Defeat by Burnley in April consigned Doncaster to relegation back to League One.