Echo protocols of an optical quantum memory