How to retrieve old e-mails that were kept in Roundcube's inbox from a backup?

Hello! I’ve got Ubuntu 16.04 (Desktop Ed.) For my e-mail I run SMTP server (Postfix/Dovecot/Roundcube).

Once in awhile I do a bare metal backup of the whole system with Clonezilla (plus a tarball file backup too just in case).

Since it takes rather long time, I often just do a backup of my www directory structure plus databases that I backup from within PHPMyAdmin. Including roundcube.sql file too. “Roundcube” folder proper resides in one of my sites’ (I’ve got a few of them on one physical machine) public_html directories.

ALSO… and that’s probably a crucial thing here… I have a content of “mail” folder which itself a sub-directory of another folder named after a user in the system (that I use as a login in webmail interface of RC). I think I created it manually when I was installing Roundcube a few months ago.

In that “mail” folder I have “.imap” subfolder too with “INBOX”, “INBOX.Sent”, “Trash” and other folders too. So I think that basically I’ve got it all as a backup.

That’s what I thought… So when my HDD died a few days ago, I easily re-created everything from a Clonezilla image made a little over one month ago.

BUT… When I go to RC’s Inbox now… I only see the e-mails that were there back then (i.e., a month ago, and not the recent ones!) Import of roundcube.sql doesn’t help.

I still have those recent emails missing… I want to somehow retrieve them or at least to have access to my recent emails (the ones that were in RC’s Inbox AFTER the Clonezilla backup had been made).

Hi ivngorov,

The post you made was a “wall of text” and very hard to read.

As your time window for editing has passed, I did it for you and divided the text in a few paragraphs to make it comprehensible.

Just to dot the i’s and cross the t’s… Ironically enough, I made all the backups except for the messages that were kept in RC (well, technically somewhere in Dovecot). My mistake was… I didn’t make the backup of ALL www folder. Just its subfolders where my sites’ files were. There was a folder “HTML” under www in which Dovecot kept my messages in “Mail” folder…

1 Like

Validating or test backups is not an easy task to get right, apparently.

I hope you didn’t loose any business critical messages. If so, perhaps you can make the original sender repeat messages that could be critical to refer in the future.

Thanks for sharing your insight. :+1: