If an appeal has been taken from a judgment entered by a court of the state, or if the time for taking an appeal has not expired, a party may obtain discovery within the scope delimited by Chapter 2 (commencing with Section 2017.010), and subject to the restrictions set forth in Chapter 5 (commencing with Section 2019.010), for purposes of perpetuating testimony or preserving information for use in the event of further proceedings in that court.
Ca. Civ. Proc. Code § 2036.010