Logically, but = and. In terms of logic, there is no difference between the two. People just use "but" when the two facts being conjoined are seemingly at odds with one another. For example:
"I got into Harvard, but i got a 155 on the LSAT"
is logically equivalent to
"I got into Harvard, and i got a 155 on the LSAT"
"A if, but only if B" is logically the same as "A if, and only if B". A implies B and B implies A.