Dynamics of glasses doped with rare earth ions: A study by permanent and transient hole-burning