A pin-hole leak can do a lot of damage.
A pin-hole leak is exactly that, a very small leak at a joint or other corrosive deterioration in copper tubing. It is sometimes called a progressive leak.
This pin-hole leak looks to have begun where the yellow arrow points.
That is a soldered joint.
It must not have been done well, or leaked slightly for some other reason.
These leaks are so small that minerals in the water will come out, which you can see accumulating here from the arrow toward the bottom.
These minerals are slowly building up here, exactly like stalagmites and stalactites you have seen in caves.
As that leaking water attacks the connection at the top of the unit, which is the rusting area at the bottom of the photo, it will deteriorate more an more. The ultimate corrosion can cause the water heater to fail.
This water heater is only 2 years old!
With corrosion like this it will not last long.
The entire connection, from the yellow arrow to the connective tube at the top of the heater needs to be replaced.
My recommendation: when done carefully and properly copper pipe connections should last many decades. That this one only lasted a short while is indicative of the unprofessional nature of the installation. Hire good service providers! Your house will appreciate it. So will your checkbook in the end. Like Red Adair said, "If you think a professional is expensive, try hiring an amateur."
Jay Markanich Real Estate Inspections, LLC
Based in Bristow, serving all of Northern Virginia.
Office (703) 330-6388 Cell (703) 585-7560