Lee Daniels’ history-based drama can be considered a sort of sequel to “Backstairs at the White House,” a 1979 NBC miniseries that followed the experiences of a mother and daughter who served on the staff at 1600 Pennsylvania Avenue over the course of eight presidencies, from Taft to Eisenhower. Essentially “The Butler” takes off from there, being loosely based on the experiences of Eugene Allen, a black man who served at the White House from Eisenhower through Reagan. Using that character—but changing the name to Cecil Gaines to allow for a good deal of dramatic license—the film sets the butler’s career against the backdrop of the Civil Rights movement occurring over the same period.

Curiously, the script is more faithful to the surrounding events than it is to those of the protagonist’s personal life. The actions attributed to the various presidents—shown in dramatized White House scenes but complemented by archival footage in many cases—are for the most part verifiable at least in spirit, even if they have obviously been tweaked for effect.

On the other hand, the choice of actors to play the various presidents may strike one as curious. James Marsden gets by as Kennedy, but Robin Williams never strikes the right tone as Eisenhower, and Liev Schreiber lacks the sheer stature of Johnson. John Cusack gets the shifty manner of Nixon right, though he looks little like him, while Alan Rickman is surprisingly effective as Reagan (surely there’s more than a bit of a joke in having Jane Fonda play Nancy). Gerald Ford and Jimmy Carter get by unscathed, as they appear only in news footage.

Still, as a potted overview of changing presidential attitudes toward civil rights policy, “The Butler” offers a reasonably accurate sketch. That’s less true, however, of the script’s treatment of its unifying character. One can’t speak with much confidence of the portrait it draws of Gaines’ (Forest Whitaker) marriage to Gloria (Oprah Winfrey), which is presented here as a union troubled by infidelity on her part with a neighbor (Terrence Howard) who’s a layabout and gambler, until Gloria sees the light and changes her ways. But there doesn’t seem to be a lot of literal truth to the story of the butler’s two sons, one of whom—Charlie, played at various ages by Isaac White and Elijah Kelley—is simply invented to serve as one of the many young soldiers killed in battle in Vietnam while the other—Louis, played by David Oyelowo—is transformed into a long-time Civil Rights fighter who’s contrasted with his father’s more cautious, deferential ways. The father-son relationship, which leads to their estrangement and eventual reunion (a schmaltzy event topped in the sentimentality department by a coda set against the backdrop of the 2008 election), is the major device that allows the film to become a personalized history of the entire Civil Rights movement. But it’s not history but historical fiction, down to Martin Luther King’s (Nalsen Ellis) observations to Louis about black domestics—though it certainly fulfills the picture’s purpose to be the story of blacks’ triumph over second-class citizenship rather than, or in addition to, the biography of a single man.

This is an earnest, well-intentioned film, less flamboyant in style than Daniels’ earlier ones (“Precious” and “The Paperboy”) but not as cinematically bland as “Backstairs at the White House.” It’s certainly blessed with a formidable cast. Whitaker underplays in comparison to the others around him, but he certainly brings unflappable dignity to the role, and shows fire in an outburst against Louis and his girlfriend (Yaya Alafia) during their Black Panther period. Cuba Gooding, Jr. and Lenny Kravitz are energetic as two of Gaines’s White House kitchen colleagues, and Winfrey plays dowdy as Gloria, with Howard doing a rather broad caricature as the cynical deadbeat she plays around with for a while. Kelley is fine as the ill-fated Charlie, but Oyelowo has many more opportunities to shine as the committed Louis, and takes advantage of them. And in what amounts to a prologue Vanessa Redgrave is typically luminous as the sympathetic plantation matriarch who befriends Cecil after her cruel son (Alex Pettyfer) abuses the boy’s mother and kills his father, while Clarence Williams has a nice cameo as the man who teaches Gaines the tricks of his trade. Technically all is solid if unspectacular, with Tim Galvin’s decent production design and Ruth Carter’s period costumes set off by Andrew Dunn’s cinematography, which gives the images a burnished glow.

“The Butler” is obviously a labor of love for all concerned, and it’s hard not to be moved by its reflection of the struggle African-Americans have endured in their still-incomplete movement toward true equality. Of course, it’s manipulative, melodramatic and rather simplistic as well—a circumstance that puts it on a par with a good TV docu-drama. And it probably would have worked better in that format if mini-series were still in vogue.