Exhibit 10.20

UNIT PURCHASE AGREEMENT

This UNIT PURCHASE AGREEMENT, dated as of July 31, 2004 (this “Agreement”), is entered into by and between Digital Realty Trust, Inc., a Maryland corporation (“Digital Realty”), and State of California Public Employees’ Retirement System, a unit of the State and Consumer Service Agency of the State of California (“CalPERS”).

RECITALS

WHEREAS, CalPERS is a Member of Global Innovation Partners, LLC, a Delaware limited liability company (“GI Partners”);

WHEREAS, Digital Realty is contemplating an initial public offering of its common stock (the “Proposed IPO”);

WHEREAS, at the closing of the Proposed IPO, GI Partners will contribute to Digital Realty, L.P., a Maryland limited partnership and a wholly-owned subsidiary of Digital Realty (the “Operating Partnership”), its interests in certain properties owned by GI Partners in exchange for partnership units of the Operating Partnership (“Partnership Units”) pursuant to that certain Contribution Agreement, dated as of the date hereof (the “Contribution Agreement”), by and between GI Partners and the Operating Partnership;

WHEREAS, pursuant to that certain Allocation Agreement, dated as of the date hereof (the “Allocation Agreement”), CalPERS will receive following the closing of the Proposed IPO and upon each exercise, if any, of the underwriters’ over-allotment option, a certain number of Partnership Units (the “CalPERS Partnership Units”) from GI Partners; and

WHEREAS, Digital Realty desires to purchase from CalPERS, and CalPERS desires to sell to Digital Realty, the CalPERS Partnership Units.

AGREEMENT

NOW, THEREFORE, in consideration of the mutual covenants and promises contained herein and for other good and valuable consideration, the receipt and adequacy of which is hereby acknowledged, the parties hereto agree as follows:

1. Purchase. Subject to the conditions set forth in Section 2 hereof and the accuracy of the representations and warranties set forth in Section 3 hereof, on each Closing Date (as defined below) CalPERS agrees to sell to Digital Realty, free and clear of all liens, and Digital Realty agrees to buy from CalPERS, the CalPERS Partnership Units for a price per unit equal to the price per share of common stock of Digital Realty set forth on the front cover page to the final prospectus distributed to investors in connection with the IPO, net of the per share cost of underwriting discounts and commissions and any financial advisory or structuring fees payable to the underwriters in connection with the Proposed IPO. The “Closing Date” shall be as soon as practicable following the closing of the Proposed IPO, or, with respect to any CalPERS Partnership Units issued as a result of the exercise on one or more occasions by the underwriters in the Proposed IPO of their over-allotment option, as soon as practicable following the closing of any such over-allotment exercise.

2. Conditions Precedent to the Purchase. The purchase of the CalPERS Partnership Units contemplated by Section 1 hereof shall be subject to the following conditions precedent: (a) Digital Realty’s registration statement with respect to the Proposed IPO to be filed with the Securities and Exchange

Commission (“SEC”) on Form S-11 after execution of this Agreement shall have been declared effective by the SEC, (b) the Proposed IPO shall have been consummated and (c) CalPERS shall have received the allocation of the CalPERS Partnership Units from GI Partners.

3. Representations and Warranties. As an inducement to enter into the transactions contemplated by this Agreement, the parties hereto separately represent and warrant as follows:

a. Due Authorization; No Violation. Each party hereby represents and warrants to the other party that: (i) the execution, delivery and performance of this Agreement by such party has been duly and validly authorized by all necessary action of such party; (ii) it has duly executed and delivered this Agreement, and this Agreement constitutes its legal, valid and binding obligation, enforceable in accordance with its terms, as such enforceability may be limited by bankruptcy or the application of equitable principles; (iii) the execution, delivery and performance of this Agreement by such party will not conflict with, result in a violation of, or constitute a default under the organization documents of such party or any other material agreement to which it is a party or bound, or under any law or judgment, order or decree applicable to such party; and (iv) no consent, approval, authorization or order of any governmental agency or body is required by such party for the consummation of the transactions contemplated herein, except such as have been obtained or made.

b. Accredited Investor. CalPERS further represents and warrants that it is an “accredited investor” (as such term is defined in Rule 501(a) of Regulation D promulgated under the Securities Act of 1933, as amended and has such knowledge and experience in financial and business matters that it is capable of evaluating the merits and risks of ownership or sale of the CalPERS Partnership Units.

c. Title. CalPERS further represents and warrants that it is the record and beneficial owner of the CalPERS Partnership Units to be sold by it hereunder, free and clear of all liens.

4. Term. This Agreement shall terminate if the Proposed IPO is not closed by March 31, 2005.

5. Governing Law. This Agreement shall be construed in accordance with and governed by the internal laws of the State of California (without giving effect to its choice of law principles).

6. Entire Agreement. This Agreement and the Allocation Agreement of even date herewith between CalPERS and the Operating Partnership constitute the entire agreement and understanding between the parties with respect to the subject matter hereof and supersede all prior covenants, agreements, promises, arrangements, communications, representations and warranties, whether oral or written, by the parties hereto or by any director, officer, member, employee, agent, affiliate or representative of any party hereto.

7. Counterparts. This Agreement may be executed in one or more counterparts, with original or facsimile signatures, each of which shall be deemed an original but all of which together shall constitute one and the same instrument.

[Signature Page Follows]

2

IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be duly executed on their respective behalf, by their respective officers thereunto duly authorized, all as of the day and year first written above.

STATE OF CALIFORNIA PUBLIC EMPLOYEES’ RETIREMENT SYSTEM, an agency of the State of California
|  | /s/ MICHAEL B. MCCOOK
By: |  | Michael B. McCook
Its: |  | Senior Investment Officer

DIGITAL REALTY TRUST, INC.
|  | /s/ RICHARD MAGNUSON
By: |  | Richard Magnuson
Its: |  | Chairman

S-1