Oscillations of the baseline of solar magnetic field and solar irradiance on a millennial timescale