Google has said it expects to restore all Gmail accounts after a bug in a storage software update wiped out the email messages of a small number of users.

‘The good news is that email was never lost and we've restored access for many of those affected,’ Google engineering vice president Ben Treynor said in a blog post.

‘Though it may take longer than we originally expected, we're making good progress and things should be back to normal for everyone soon.’

Google said it expected to fully restore the Gmail accounts of users who saw their emails deleted from their inboxes over the weekend.

‘To protect your information from these unusual bugs, we also back it up to tape,’ Mr Treynor said. ‘Since the tapes are offline, they're protected.’

However, because the back-up messages are stored on tape, it takes longer to get them back into Gmail accounts, he added.

Google has stopped installing the storage software update that caused the problem, and reverted to the previous version. Google said that 0.02% of users email service had been affected by the problem.

Google does not release official figures for the total number of Gmail users but they are estimated to number around 200m.