The magnetic field of earth protects us from solar wind as we know it, but after the solar wind interacts our magnetic field.
Does the magnetic field of earth restore after it deflects the solar wind from the sun?
Yes. After the charged particles that have distorted the magnetic field passed, it goes back to normal. Otherwise it could not have been doing this for the last few billion years.
This then looks something like this (data from the ACE satellite):
Remember that a magnetic field is just that: a field . There's no mass there. Its shape depends on the electromagnetic properties of Earth -- primarily the behavior of the outer core.
When there's a significant Solar ejection, the electrically active particles in that mass cause local changes in the magnetic field pattern (equivalent to isobars , or lines of constant field strength, etc.) So long as the solar ejecta do not damage the Earth in any significant way, once the particles are gone, the field lines will revert to their default layout.