We present experiments on optical writing and erasing of microscopic magnetic domain patterns on an epitaxial ferrite-garnet film. The film is initially uniformly magnetized normally to the surface. A weak constant magnetic field pointing in the same direction as the magnetization is applied, and magnetic domain patterns are written and erased by locally heating the film with a pulsed focused laser beam. For switching the magnetization, in both directions, only the beam diameter and the peak power of the laser pulse need to be controlled; the direction and strength of the external magnetic field are kept unchanged. The switching is essentially all-optical, which widens the area of potential applications of the method. We also show that domain patterns can be optically recorded in multilayered ferrite-garnet samples. Large Faraday-rotation angles in our films enable both spatial and temporal observations of the magnetization reversal.