At ambient temperatures, CeRuSn exhibits an extraordinary structure with a coexistence of two types of Ce ions in a metallic environment, namely trivalent Ce3+ and intermediate valent Ce(4-x)+. Charge ordering produces a doubling of the unit cell along the c-axis with respect to the basic monoclinic CeCoAl type structure. Below room temperature, a phase transition with very broad hysteresis has been observed in various bulk properties like electrical resistivity, magnetic susceptibility, and specific heat. The present x-ray diffraction results show that at low temperatures the doubling of the CeCoAl type structure is replaced by an ill-defined modulated ground state. In this state, at least three different modulation periods compete, with the dominant mode close to a tripling of the basic cell. The transition is accompanied by a significant contraction of the c axis. XANES data suggest that the average Ce valence remains constant, thus the observed c axis contraction is not due to any valence transition. We propose a qualitative structure model with modified stacking sequences of Ce3+ and Ce(4-x)+ layers in the various modulated phases. Surprisingly, far below 100 K the modulated state is sensitive to x-ray irradiation at photon fluxes available at a synchrotron. With photon fluxes of order 10E12/s, the modulated ground state can be destroyed on a timescale of minutes and the doubling of the CeCoAl cell observed at room temperature is recovered. The final state is metastable at 10 K. Heating the sample above 60 K again leads to a recovery of the modulated state. Thus, CeRuSn exhibits both thermally and x-ray induced reversible transformations of the Ce3+/Ce(4-x)+ charge ordering pattern. Such a behavior is unique among any know intermetallic compound.