It's Monday, so let me rain on this parade a little.
Current magnetic shield designs are adequate to protect against ionizing radiation from the sun. They aren't sufficient to protect against galactic cosmic radiation, which has a lot more energy in each particle. To effectively block that would take a shield with energy 100x greater. If Bamford's shield parameters from TildalWave's answer are used, then 500 kW of power would be needed. It can't be modulated according to current needs, it has to always be at that power level, because GCR fluctuates only very slowly, over the solar cycle, it isn't a matter of occasional storms like solar ionizing radiation. The mass and energy needs of such a system are prohibitive. The effect over time on human health of exposure to a magnetic field of such strength is unknown.
The health effect of cosmic rays at the levels in interplanetary space is not known. Exposure for a year or two may only increase the chances of cancer, or it could be debilitating, if not immediately then a few years down the road. Once we have much more data, it may turn out to be adequate to use a weaker magnetic field that diverts only particles with energies below 500 MeV, for instance - that would be the majority of particles. Or it might not.
See this article on the topic.
Edit: To clarify the potential danger of GCR, here is a table taken from the document the 2nd link goes to, which is an excellent, up to date summary of the matter:
The shielding postulated to calculate the last column is 3 g/cm2 of aluminum... plus the flesh of your body surrounding the important bits. Which is to say, they are assuming that if a 400 MeV proton hits a molecule in one of your muscles, that isn't really important, they are only considering the 'blood forming organs' (which doesn't include your brain). That alone, I think, communicates how much our knowledge of this is preliminary.
It is also critical to bear in mind that this shielding is calculated to help because it is so thin. Because that means that most particles will simply pass right through the whole ship practically as though it wasn't even there. Once one of those particles hits the nucleus of an atom in its path, that's when the real trouble begins. They smash new particles off the that nucleus, multiplying the problem. From Appendix E of NASA's "Space Settlements: A Design Study" (which is an excellent introduction):
There are three mechanisms that are important in mass shielding.
First, a charged particle excites electrons for many hundreds of
angstroms about its trajectory. This excitation extracts kinetic
energy at a roughly constant rate for relativistic particles and acts
as a braking mechanism. For relativistic protons in low-Z matter this
"linear energy transfer" is $2 MeV/g*cm^-2$ of matter. If the thickness
of the mass shield is great enough a particle of finite kinetic energy
is stopped. This is the least effective shielding mechanism in matter
for relativistic particles.
The second mechanism is nuclear attenuation. For silicon dioxide the
average nuclear cross section is 0.4 barn ($10^{-24}\ cm^2$). Thus if a
charged particle traverses far enough in the shield (composed of
silicon dioxide) it collides with a nucleus and loses energy by
inelastic collisions with the nuclear matter. The measure of how far a
particle must travel to have a substantial chance of nuclear collision
is the mean free path, which for silicon dioxide is $106 g/cm^2$ . This
mechanism is an exponential damper of primary beam particles.
Opposing the beam clearing tendency of nuclear attenuation is the
creation of energetic secondary particles. For each nuclear collision
there is beam loss from nuclear excitation, and beam enhancement
(though with overall energy degradation through the increase of
entropy) from the secondaries emitted by the excited nuclei. These
secondary particles are, of course, attenuated themselves by further
nuclear collisions with roughly the same mean free path as the primary
particles
So, in all of the parts of the hypothetical ship where there is more stuff than the 3 g/cm2 of aluminum between you and space, there is a much higher chance that you will be struck by damaging particles from those directions, unless the solid stuff in between is at least a couple of meters thick. It might take 5 meters of stuff before the cascade of particles generated by such collisions peters out due to its kinetic energy having been dispersed.
So, maybe you could spend 10 years in deep space and get only the maximum allowable radiation for the career of an astronaut according to NASA, which means you don't have to worry about anything more than a higher chance of cancer, and cataracts. Or maybe that point of view is way too sunny. We really don't know. From the Eugene Parker article above:
One estimate from NASA is that about one third of the DNA in an
astronaut’s body would be cut by cosmic rays every year.