Buying new "everything" after a power spike(?) fried it all

Any water pipe will do the trick, but not gas (risk of explosion if any arcing occurs). Just put a tight metal band or earthing strap (like this or this) around it, screw a large gauge cable to that, and link that to the earth lug (or case) on your UPS.

However, there may be regulations that govern what you may use and who may do it, and upon which insurance companies may decide your legal liability in the case of problems.

Buy an earth leakage tester. They give you several currents to test the trigger level that your breakers trip at, and indicate wiring faults in the house or extension cables.

When earth leakage testing, just be sure that you actually have residual current devices (RCDs - required by law in Australia but don’t know about elsewhere). Of course, when the RCD trips, all appliances or lights on that circuit go dead, so just warn other occupants about what might happen (will happen at 100mA test).