Code of Civil Procedure CCP § 2031.320
(a) If a party filing a response to a demand for inspection, copying, testing, or sampling under Sections 2031.210 , 2031.220 , 2031.230 , 2031.240 , and 2031.280 thereafter fails to permit the inspection, copying, testing, or sampling in accordance with that party’s statement of compliance, the demanding party may move for an order compelling compliance.
(b) Except as provided in subdivision (d), the court shall impose a monetary sanction under Chapter 7 (commencing with Section 2023.010 ) against any party, person, or attorney who unsuccessfully makes or opposes a motion to compel compliance with a demand, unless it finds that the one subject to the sanction acted with substantial justification or that other circumstances make the imposition of the sanction unjust.
(c) Except as provided in subdivision (d), if a party then fails to obey an order compelling inspection, copying, testing, or sampling, the court may make those orders that are just, including the imposition of an issue sanction, an evidence sanction, or a terminating sanction under Chapter 7 (commencing with Section 2023.010 ). In lieu of or in addition to that sanction, the court may impose a monetary sanction under Chapter 7 (commencing with Section 2023.010 ).
(d)(1) Notwithstanding subdivisions (b) and (c), absent exceptional circumstances, the court shall not impose sanctions on a party or any attorney of a party for failure to provide electronically stored information that has been lost, damaged, altered, or overwritten as the result of the routine, good faith operation of an electronic information system.
(2) This subdivision shall not be construed to alter any obligation to preserve discoverable information.