The move was expected by many after Stanford announced the hiring of David Shaw as its replacement for Harbaugh Thursday.
But there were some reports that Harbaugh wanted to lure Trestman out of the Canadian Football League, where he is currently coaching, and back into the seat he once held with the 49ers.
Harbaugh and Trestman worked together with the Oakland Raiders before Harbaugh left to coach at the University of San Diego.
49ers' fans may have forgotten about Trestman's time in San Francisco because they have become accustomed to watching abismal offensive displays over the last eight years but when the team hire Steve Mariucci, then owner Eddie Debartolo dismissed the much-maligned Trestman from his offensive duties.
The team has not officially announced the hiring of Roman but a team source has confirmed the hiring to several outlets.