Context : The space experiment CoRoT has recently detected transits by a hot Jupiter across the disk of an active G7V star ( CoRoT-Exo-2a ) that can be considered as a good proxy for the Sun at an age of approximately 0.5 Gyr . Aims : We present a spot modelling of the optical variability of the star during 142 days of uninterrupted observations performed by CoRoT with unprecedented photometric precision . Methods : We apply spot modelling approaches previously tested in the case of the Sun by modelling total solar irradiance variations , a good proxy for the optical flux variations of the Sun as a star . The best results in terms of mapping of the surface brightness inhomogeneities are obtained by means of maximum entropy regularized models . To model the light curve of CoRoT-Exo-2a , we take into account both the photometric effects of cool spots as well as those of solar-like faculae , adopting solar analogy . Results : Two active longitudes initially on opposite hemispheres are found on the photosphere of CoRoT-Exo-2a with a rotation period of 4.522 \pm 0.024 days . Their separation changes by \approx 80 ^ { \circ } during the time span of the observations . From this variation , a relative amplitude of the surface differential rotation lower than \sim 1 percent is estimated . Individual spots form within the active longitudes and show an angular velocity about \sim 1 percent smaller than that of the longitude pattern . The total spotted area shows a cyclic oscillation with a period of 28.9 \pm 4.3 days , which is close to 10 times the synodic period of the planet as seen by the rotating active longitudes . We discuss the effects of solar-like faculae on our models , finding indication of a facular contribution to the optical flux variations of CoRoT-Exo-2a being significantly smaller than in the present Sun . Conclusions : The implications of such results for the internal rotation of CoRoT-Exo-2a are discussed on the basis of solar analogy . A possible magnetic star-planet interaction is suggested by the cyclic variation of the spotted area . Alternatively , the 28.9 -d cycle may be related to Rossby-type waves propagating in the subphotospheric layers of the star .