What environment variables are set in .profile for OS X?
In your terminal that still has the variables write printenv &gt; with_profile.txt. This will dump all available variables into with_profile.txt. Open a new terminal window and write printenv &gt; without_profile.txt. 

Start python and write:

with open("with_profile.txt") as w_profile, open("without_profile.txt") as wo_profile: 
    w_profile_vars = {line.strip() for line in w_profile}
    wo_profile_vars = {line.strip() for line in wo_profile}
    for var in w_profile_vars - wo_profile_vars: 
        print var


That should print the set of missing variables one by one.

P.S.

~/.profile is not there by default (not on Mavericks, Yosemite and El Capitan for sure). Hence it's possible that you overwrote nothing, unless you had created the file yourself a long ago.