It isn't always a mistake to get back together with an ex. Sometimes, it's the right thing to do. You just have to take a minute to thick about whether it would make you happier or sadder in the long run. If the following things are true, then you should probably get back together with him:
1. The Problem That Caused the Breakup is Fixed
What was the main reason behind the breakup? If it was because he refused to get married, but now he's interested in the idea of marriage, you can think about getting back together.