
21 Cal.Rptr.3d 532 (2004)
124 Cal.App.4th 762
TOSHIBA AMERICA ELECTRONIC COMPONENTS, INC., Petitioner,
v.
The SUPERIOR COURT of Santa Clara County, Respondent;
Lexar Media, Inc., Real Party in Interest.
No. H027029.
Court of Appeal, Sixth District.
December 3, 2004.
*535 Morrison & Foerster, Michael J. Jacobs, Kenneth A. Kuwayti, Jana G. Gold, Palo Alto, Tami L. Swiger, Alan Cope Johnston, Louise C. Stoupe, Taro Isshiki, Toyko, for Petitioner Toshiba America Electronic Components, Inc.
Weil, Gotshal & Manges, David J. Healey, Houston, TX, Lisa R. Eskow, Austin, TX, Matthew D. Powers, Christopher J. Cox, Perry Clark, Redwood Shores, for Real Party in Interest Lexar Media, Inc.
PREMO, J.
In this discovery dispute the parties disagree about whether the demanding party or the responding party should pay the cost (possibly as much as $1.9 million) for recovering usable information from the responding party's computer backup tapes. We conclude that in a proper case, Code of Civil Procedure, section 2031, subdivision (g)(1)[1] (hereafter section 2031(g)(1)) requires the demanding party to pay that expense. The determination of a proper case is a factual matter best left to the discretion of the trial court.

I. FACTUAL AND PROCEDURAL BACKGROUND
Plaintiff, Lexar Media, Inc. (Lexar) sued Toshiba America Electronic Components, Inc. (TAEC) and TAEC's parent company Toshiba, Inc. for misappropriation of trade secrets, breach of fiduciary duty, and unfair competition. Lexar served TAEC with a request for production and inspection of documents (§ 2031) by which Lexar sought 60 categories of documents. Lexar defined documents to include "electronic mail" and "other forms of electronically or magnetically maintained information." TAEC responded, subject to assorted objections, that it would produce copies of documents responsive to many of the 60 categories. After TAEC produced more than 20,000 pages of documents, which TAEC described as all of the "readily available" responsive documents, a dispute arose about who should pay for recovery of additional responsive material (specifically, email correspondence) stored on TAEC's computer backup tapes.
TAEC had more than 800 backup tapes for the pertinent time period  1994 through October 2002. TAEC hired an electronic discovery specialist to examine the tapes. According to this specialist the data contained on the tapes had to be manipulated in various ways in order to search the tapes to find out what was contained in them. Complete processing of all the tapes, which would include analyzing the data contained on the tapes, identifying and restoring the files, searching the restored files for responsive items, and producing the specified data, would cost between $1.5 and $1.9 million. Processing a selection of 130 tapes surrounding 15 key dates would cost at least $211,250. TAEC gave this information to Lexar and asked Lexar to shoulder some or all of the cost depending upon how *536 many tapes Lexar wanted processed. Lexar refused.
Lexar filed a motion to compel production of all responsive documents contained on the backup tapes. (§ 2031, subd. (n).) Anticipating TAEC's argument that Lexar should bear part of the cost, Lexar argued that cost-shifting in this case would be unfair. TAEC had admitted that the tapes were "not in the best condition for discovery." Some of the software that TAEC was using when the tapes were made had become obsolete, requiring the development of specialized conversion tools to access the information. Some of the tapes had deteriorated from age. Still others were incorrectly labeled. Lexar cited three federal district court cases that held, in effect, that a demanding party ought not to be penalized when a producing party has chosen to keep records in a manner that makes them difficult to retrieve. (In re Brand Name Prescription Drugs Antitrust Litigation, (N.D.Ill.1995) 1995 WL 360526; Rhone-Poulenc Rorer, Inc. v. Home Indem. Co., (E.D.Penn.1991) 1991 WL 111040; Kozlowski v. Sears, Roebuck & Co. (D.Mass.1976) 73 F.R.D. 73, 76.) In the alternative, Lexar argued that the cost-shifting analysis used in federal court did not warrant cost shifting in this case. (Zubulake v. UBS Warburg LLC (S.D.N.Y.2003) 217 F.R.D. 309, 322 (Zubulake).) TAEC responded that restoring its electronic backup tapes was an undue burden and that the federal analysis favored shifting the cost to Lexar. Neither party referred to the pertinent California statute, section 2031(g)(1).
The trial court granted Lexar's motion without comment or explanation. The court did not order Lexar to bear any of the cost, nor did it limit the production request to a representative sampling as Lexar had suggested as an alternative. The court simply ordered TAEC to produce all nonprivileged emails from its backup tapes within 60 days.
TAEC petitioned for a writ of mandate and requested a stay of the trial court's order. In its writ petition, TAEC argued that the trial court abused its discretion in failing to require Lexar to pay all or part of the cost of restoring and searching its backup tapes. TAEC relied upon a line of federal cases in which the courts had shifted the expense of restoring or retrieving inaccessible data from the responding party to the demanding party. TAEC also cited section 2031(g)(1) and argued that it was an automatic cost-shifting provision that should apply to the instant matter. We issued the temporary stay and solicited preliminary opposition asking the parties to address the application of section 2031(g)(1). Following receipt of preliminary briefing, we issued an order to show cause why a peremptory writ should not issue as requested.

II. ISSUE
Section 2031 contains the discovery procedures for demanding and producing documents and things. Section 2031(g)(1) specifies the manner in which the production is to be made: "Any documents demanded shall either be produced as they are kept in the usual course of business, or be organized and labeled to correspond with the categories in the demand. If necessary, the responding party at the reasonable expense of the demanding party shall, through detection devices, translate any data compilations included in the demand into reasonably usable form." (Italics added.)
The parties do not dispute that TAEC's backup tapes are "data compilations" within the meaning of section 2031(g)(1) or that TAEC will incur some expense to manipulate the tapes in order to produce usable information responsive to Lexar's document *537 demand. Their only dispute is whether the phrase "at the reasonable expense of the demanding party" is a mandatory cost-shifting provision or whether it merely permits the trial court to shift the cost to the demanding party when the responding party objects.

III. APPROPRIATENESS OF WRIT REVIEW
Although we rarely review discovery orders by way of an extraordinary writ, it is appropriate to do so where appellate remedies are inadequate or where discretionary review is necessary to answer a question of first impression of general importance to the trial courts and the legal profession. (Oceanside Union School Dist. v. Superior Court (1962) 58 Cal.2d 180, 185-186, fn. 4, 23 Cal.Rptr. 375, 373 P.2d 439; People v. Superior Court (Mouchaourab) (2000) 78 Cal.App.4th 403, 413, 92 Cal.Rptr.2d 829.) In the present case, California courts have not ruled upon the question of which party should pay when it is necessary to translate electronic data compilations in order to obtain usable information responsive to a discovery request. The question is one that is bound to arise with increasing frequency. Given that the cost of translating such material can be exorbitant, the question of who should bear the cost raises practical concerns as well as complicated policy issues. We believe these issues are sufficiently novel and important to justify review by extraordinary writ. (See Lipton v. Superior Court (1996) 48 Cal.App.4th 1599, 1612, 56 Cal.Rptr.2d 341.)

IV. STANDARD OF REVIEW
"Management of discovery generally lies within the sound discretion of the trial court. [Citations.] Where there is a basis for the trial court's ruling and it is supported by the evidence, a reviewing court will not substitute its opinion for that of the trial court. [Citation.] The trial court's determination will be set aside only when it has been demonstrated that there was `no legal justification' for the order granting or denying the discovery in question. [Citations.]" (Lipton v. Superior Court, supra, 48 Cal.App.4th at p. 1612, 56 Cal.Rptr.2d 341.) Of course, while the trial court has wide discretion in managing discovery issues, "there can be no room for the exercise of such discretion if no ground exists upon which it might operate." (Carlson v. Superior Court (1961) 56 Cal.2d 431, 438, 15 Cal.Rptr. 132, 364 P.2d 308.) Where, as here, the relevant facts are undisputed, we review a trial court's exercise of discretion as a question of law. (San Diego Unified Port Dist. v. Douglas E. Barnhart, Inc. (2002) 95 Cal.App.4th 1400, 1404, 116 Cal.Rptr.2d 65 (Barnhart).) An appellate court may reverse a trial court decision for abuse of discretion where the exercise of that discretion is not based upon the applicable law. "Action that transgresses the confines of the applicable principles of law is outside the scope of discretion and we call such action an abuse of discretion." (City of Sacramento v. Drew (1989) 207 Cal.App.3d 1287, 1297, 255 Cal.Rptr. 704.)

V. DISCUSSION

A. Background
Computer backup tapes are magnetic tapes used to record the data contained in a computer network. The tapes are intended to provide users a means of recovering lost data in the event of a disastrous system failure. Businesses generally back up their networks on a routine schedule, such as daily, weekly and monthly. (Feldman & Kohn, The Essentials of Computer Discovery, in Annual Internet Law Institute 51, reprinted at PLI Patents, Copyrights, Trademark, & Literary Property Course Handbook Series, No. 564 (1999), *538 pp. 54-55.) "Back ups provide a historical snapshot of the data stored on a system on the particular day the back up was made. Reviewing a series of back up tapes can provide a wealth of information about how a particular matter progressed over several weeks or months. The difficulty with using backup data is that the media (usually tapes) hold a large amount of data that is only loosely organized. Consequently, finding relevant data requires restoring a tape, viewing its directories, and searching within the directories for specific files. If the file is not on the tape, the process must be repeated for each backup tape." (Ibid.) Finding relevant data on a large number of backup tapes can be an expensive and time-consuming process. It is that expense that gave rise to the instant dispute.

B. Section 2031(g)(1) Shifts Costs to the Demanding Party
The general rule in both state and federal court is that the responding party bears the expense typically involved in responding to discovery requests, such as the expense of producing documents. (See Barnhart, supra, 95 Cal.App.4th at p. 1404, 116 Cal.Rptr.2d 65, citing In re Puerto Rico Electric Power Authority (1st Cir.1982) 687 F.2d 501, 507.) In some circumstances, however, principles of fundamental fairness require the demanding party to pay any significant "`special attendant' costs beyond those typically involved in responding to routine discovery." (Barnhart, supra, 95 Cal.App.4th at p. 1405, 116 Cal.Rptr.2d 65.) Often, the question is one that is addressed to the trial court when the responding party objects to a particular discovery request and seeks relief from the court by way of a protective order. (See, e.g. § 2031, subd. (f); Fed. Rules Civ. Proc., rule 26(c)(2), 28 U.S.C.)[2] But there are at least two California statutes that place the burden on the demanding party at the outset: section 2034, subdivision (i), which requires the deposing party to pay expert witness fees when deposing another party's expert, and section 2025, subdivision (p), which requires the party noticing any deposition to pay the costs of transcribing it. These statutes reflect the Legislature's determination that in the circumstances described by the statutes, principles of fairness call for placing the expense upon the demanding party. In our view, section 2031(g)(1) reflects a similar legislative determination.
In reaching our conclusion, we apply well-settled rules of statutory construction. "[O]ur first task in construing a statute is to ascertain the intent of the Legislature so as to effectuate the purpose of the law. In determining such intent, a court must look first to the words of the statute themselves, giving to the language its usual, ordinary import and according significance, if possible, to every word, phrase and sentence in pursuance of the legislative purpose. A construction making some words surplusage is to be avoided. The words of the statute must be construed in context, keeping in mind the statutory purpose, and statutes or statutory sections relating to the same subject must be harmonized, both internally and with each other, to the extent possible." (Dyna-Med, Inc. v. Fair Employment & Housing Com. (1987) 43 Cal.3d 1379, 1386-1387, 241 Cal.Rptr. 67, 743 P.2d 1323.)
Section 2031(g)(1) expressly provides that "[i]f necessary, the responding party at the reasonable expense of the demanding party shall, ... translate any data compilations ... into reasonably usable form." The clause is unequivocal. We need not engage in protracted statutory *539 analysis because its plain language clearly states that if translation is necessary, the responding party must do it at the demanding party's reasonable expense.
Lexar contends that the cost-shifting specified by section 2031(g)(1) may only be had upon a showing by the responding party that it will suffer undue burden or expense. This contention ignores the plain language of the statute. It is also based almost entirely upon federal law, which does not include a provision similar to the cost-shifting clause of section 2031(g)(1). Federal decisions are compelling where the California law is based upon a federal statute or the federal rules. (People v. Soto (1998) 64 Cal.App.4th 966, 987, 75 Cal.Rptr.2d 605.) But we cannot ignore the fact that California law governs in California cases. (International Ins. Co. v. Montrose Chemical Corp. (1991) 231 Cal.App.3d 1367, 1371, 282 Cal.Rptr. 783.) Given the patent difference between the state and federal schemes, Lexar's reliance upon federal decisions is misplaced. (Cf. J.R. Norton Co. v. General Teamsters, Warehousemen & Helpers Union (1989) 208 Cal.App.3d 430, 442, 256 Cal.Rptr. 246.) Furthermore, if we were to interpret the subdivision as Lexar contends, the cost-shifting provision would be surplusage. The trial court always has discretion to condition the production of documents upon "specified terms and conditions," which would include the discretion to shift costs in an appropriate case. (§ 2031, subd. (f)(4).)
Lexar also argues that interpreting section 2031(g)(1) as an exception to the general rule would conflict with settled federal law. We agree that the cost-shifting provision of section 2031(g)(1) conflicts with the federal rule, but it appears to us that the Legislature intended it to be that way.
Section 2031 was modeled on rule 34 (28 U.S.C.). Rule 34(a) allows a party to serve a request to produce "any designated documents (including writings, drawings, graphs, charts, photographs, phonorecords, and other data compilations from which information can be obtained, translated, if necessary, by the respondent through detection devices into reasonably usable form)...." Rule 34(b) specifies the manner in which a production is to be made. It states that the producing party shall make the production of documents "as they are kept in the usual course of business or shall organize and label them to correspond with the categories in the request." No part of rule 34 requires the demanding party to pay the cost of translating data compilations.
The only reference in the legislative history to the cost-shifting provision of section 2031(g)(1) (former section 2031, subd. (f)(1), as amended by Stats.1987, ch. 86, § 13) is a reporter's note contained in the 1986 revisions to the Discovery Act: "The requirement that documents not be jumbled is taken from [rule] 34(b), as amended in 1970. Provision is made for translating data compilations by means of the responding party's equipment, but at the expense of the party seeking discovery." (State Bar/Judicial Council J. Com. on Discovery, Proposed Cal. Civil Discovery Act of 1986, and Reporter's Notes, notes on § 2031 reprinted in 2 Hogan & Weber, Cal. Civil Discovery (1997) appen. C, p. 430.) This note indicates to us that the revised statute was modeled on rule 34 and like that rule, required the responding party to translate data compilations if necessary; but unlike the federal rule, the revision imposed the expense of the translation upon the demanding party.
Lexar cites two policy reasons in support of its argument that the cost-shifting provision of section 2031(g)(1) is permissive only. First, Lexar contends that statutory cost shifting will encourage gamesmanship *540 in litigation. In our view, the potential for discovery abuse is no greater when the demanding party is expected to bear the expense of translating a data compilation into usable form than it is when the responding party pays. If the respondent is expected to bear its own expense, the demanding party has no incentive to demand anything less than all electronic data in any form. (See McPeek v. Ashcroft (D.D.C.2001) 202 F.R.D. 31, 33-34.) As this case demonstrates, such an unlimited demand can result in astronomical costs to the responding party, which in turn inflates the settlement value of even meritless cases. If the demanding party were required to bear the expense, then presumably that party would only demand what it really needs. "There is certainly no controlling authority for the proposition that restoring all backup tapes is necessary in every case." (Id. at p. 33.)
On the other hand, we recognize that even when the discovery demand is narrowly drawn, the cost of recovering data from backup tapes or other data compilations can be exorbitant. It has been suggested that shifting the expense to the demanding party could mean that parties with limited resources would be restrained from obtaining discovery and might avoid bringing meritorious claims in the first place. (Zubulake, supra, 217 F.R.D. at pp. 317-318.) Lexar also argues that if demanding parties are required to pay to translate information contained in relatively inaccessible formats, business will choose such formats for the purpose of burying data. Assuming there is some basis for these concerns, it is important to note that the statute requires that the demanding party bear only its reasonable expense and then only when translation is necessary to obtain usable data. The reasonableness and necessity qualifications incorporate a measure of fairness that should mitigate these policy concerns.
Lexar also argues that statutory cost shifting would divest the trial court of its traditional discretion in discovery matters and would always require a requesting party to pay all costs associated with any translation of a data compilation regardless of the particular circumstances of the case. This is simply not so. The Discovery Act authorizes the trial court to manage discovery and to prevent misuse of discovery procedures. (See People v. Superior Court (Cheek) (2001) 94 Cal.App.4th 980, 987, 114 Cal.Rptr.2d 760.) Moreover, as we have explained, the statute restricts the costs shifted to those that are necessary and reasonable. Where a demanding party is asked to pay for translations that the party does not believe are necessary, or when the party disputes the reasonableness of the expenses alleged, the party may always seek a protective order or move to compel production and the trial court may then make whatever orders justice requires. (§ 2031, subd. (f)(n).)
In any event, it is not our role to set policy here. "[A]side from constitutional policy, the Legislature, and not the courts, is vested with the responsibility to declare the public policy of the state." (Green v. Ralee Engineering Co. (1998) 19 Cal.4th 66, 71, 78 Cal.Rptr.2d 16, 960 P.2d 1046.) By enacting the cost-shifting clause of section 2031(g)(1) our Legislature has identified the expense of translating data compilations into usable form as one that, in the public's interest, should be placed upon the demanding party. That is, section 2031(g)(1) is a legislatively determined exception to the general rule that the responding party should bear the cost of responding to discovery. When there is no dispute about the application of the statute, the statute automatically shifts the expense of translating a data compilation into usable form to the demanding party.
*541 The trial court's decision, which was based upon the general rule that the responding party bears that expense, was based upon a faulty legal analysis and was, therefore, an abuse of discretion.
The trial court's order was an abuse of discretion not because section 2031(g)(1) necessarily requires Lexar to pay all of TAEC's expenses in recovering data from its backup tapes, but because the trial court was never asked to decide whether and to what extent that subdivision applies to the production in dispute.[3] An order compelling TAEC to produce all responsive documents contained in the tapes without also requiring Lexar to pay any of the expense involved in translating the tapes into usable form, is an abuse of discretion absent a finding that translation is not necessary or that section 2031(g)(1) does not apply for some other reason.

C. The Trial Court Has Discretion to Determine the Applicability of Section 2031(g)(1) and to Set the Demanding Party's Reasonable Expense
Having concluded that section 2031(g)(1) shifts to the discovering party the expense of translating a data compilation into usable form, we should point out that our conclusion does not mean that the demanding party must always pay all the costs associated with retrieving usable data from backup tapes.[4] Section 2031(g)(1) is clear that the demanding party is expected to pay only its reasonable expense for a necessary translation. Reasonableness and necessity are purely factual issues (undoubtedly there are others), which, when disputed, are properly submitted to the discretion of the trial court.
We observe that unlike sections 2025, subdivision (p) and 2034, subdivision (i)(4), section 2031(g)(1) does not contain a specific procedure for challenging the burden it imposes upon the demanding party. Consequently, litigants will have to avail themselves of generally applicable procedures to seek relief when necessary. For example, subdivision (f) of section 2031 permits "any party" to seek a protective order when a document demand presents an "undue burden and expense." Thus, Lexar could seek relief from the court by way of a protective order. Presuming that Lexar does so, the trial court should exercise its discretion and authority to manage the discovery dispute. (See Cottle v. Superior Court (1992) 3 Cal.App.4th 1367, 1378, 5 Cal.Rptr.2d 882; and see Calcor Space Facility, Inc. v. Superior Court (1997) 53 Cal.App.4th 216, 221, 61 Cal.Rptr.2d 567.) Of course, the trial court cannot exercise its discretion in a factual vacuum. Since it may be impossible to determine in advance whether or to what extent the backup tapes will yield relevant material, the court should encourage the parties to meet and confer about translating a sample of the tapes (see Zubulake, supra, 217 F.R.D. at *542 pp. 323-324) and to otherwise develop information in order to inform the analysis of the extent to which Lexar should bear the expenses TAEC has claimed.

VI. DISPOSITION
Let a peremptory writ of mandate issue directing respondent to vacate its order granting Lexar's Motion to Compel Electronic Document Production and to permit further proceedings, as necessary, to determine whether and to what extent Code of Civil Procedure section 2031, subdivision (g)(1) applies to Lexar's demand for documents contained in TAEC's computer backup tapes.
The temporary stay order is vacated.
Each party shall bear its own costs in this original proceeding.
WE CONCUR: RUSHING, P.J. and ELIA, J.
NOTES
[1]  Hereafter, all undesignated statutory references are to the Code of Civil Procedure.
[2]  Further references to rules are to the Federal Rules of Civil Procedure.
[3]  Since the question that was litigated was whether Lexar should have been required to pay the expense, not how much it should have paid, we decline TAEC's invitation to rule that Lexar must pay the costs TEAC quoted in its papers. We express no opinion on the appropriateness or the reasonableness of the costs cited by TEAC.
[4]  At oral argument, Lexar advanced the additional theory that since its document demand sought only email communications and not the backup tapes themselves, no data compilation was "included in the demand" so that section 2031(g)(1) does not apply at all. Lexar also argued that the expense of converting the tapes was not truly necessary but was to be incurred only because TAEC refused to turn all the tapes over to Lexar in their original form. We decline to reach these questions because they were not raised in the briefs. More importantly, they are factual issues that were never addressed by the trial court and, therefore, are not properly before us in any event.
