The injury was something Barry had felt last season and it returned in time to rule him out of England's Euro 2012 campaign, leaving him with little choice but to have surgery when the pains caused him more problems while having time off.
Barry added that his recuperation is going well so far, with early indications pointing to a successful procedure, and although he is hopeful he will be back in time for the beginning of the season, the former Aston Villa man does not want to put a specific time frame on his return.
Barry told the club's official website: "I had an operation two weeks ago. It's just an on-going problem really from last season that didn't seem to heal up.
"I felt it again when I went away with England and so I had some time off, but it still didn't clear up, so the next step was the operation.
"The problem was in the stomach, so after seeing a specialist I had a hernia operation. The main aim of it was to repair the muscles inside and make them stronger.
"Early signs are really good, the scars have healed really well, but we'll see how I feel when I start playing again. Fingers crossed it will all have healed up.
"I think the worst of it's over now, there will be a two week healing process and I've started my rehab to try and get fit and catch up with the rest of the lads.
"I don't really want to put a timescale on it, but hopefully I'll be ready for the main games starting."
Missing pre-season action is something Barry is not used to following his long spell at Villa and he admits that his summer has been a frustrating one until now.
He continued: "This is my 15th or 16thpre-season and it's the first one I've really missed, so I've been lucky up until now, but it is frustrating because pre-season is really important in terms of fitness for later on and I'm missing out on a big chunk of it.
"But, I'm working hard now to try and catch up, so the hard work will probably start from now on."
The 31-year-old is also excited about the prospect of City defending their Premier League title after a dramatic end to last season, but currently he is focusing on getting himself back into contention.
He added: "I'm looking forward to the new season. Obviously it was a fantastic end last season and now there will be more pressure on the team.
"But to head into the new season as champions gives you a great deal of confidence and myself and the lads are looking forward to trying to regain the title.
"At the minute my mind is just set on being fit and being out there 100 per cent and try and feature in as many games as possible this season.
"The immediate aim is to try and feel good when I start training with the lads, so I’ll take it one step at a time."