Mischa Barton has obtained a restraining order against her ex-boyfriend Jon Zacharias and he has agreed not to sell nude photos or sex tapes of her.