Save and restore collection metadata on restart and rename.