Between when its working ok, and creates the .bak file what happens?
Just a restart?
What does the retroarch controller folder look like before and after?
Does ES prompt you to re-enter the controller details at any point?
RetroPie help guides --> https://goo.gl/Yfy8kj
Please read this before asking for help --> http://goo.gl/eLErnl