1 (edited by dropestein 2020-06-26 23:25:27)

Topic: Directly importing vmail/vmail1 mailboxes backup

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2.1 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer?: Downloadable installer
- Linux/BSD distribution name and version: Debian GNU/Linux 10 (buster)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?: Nope sad
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi guys! I'm recurring to you again now for something I couldn't find in other places:
This is about backing up the vmail folder, reinstalling iRedMail, receiving a couple of emails and restoring the vmail folder.

The cronology:
1- I had a iRedMail installation with Roundcube
2- I backed up the vmail/vmail1 folder using rsync
3- I wiped my VPS and made a fresh install of iRedMail, now without Roundcube but with SOGo
4- I created all my original mailboxes again and even used one for some emails yesterday
5- Today I backed up my current vmail/vmail1 folder just in case
6- Then restored the original vmail/vmail1 folder withou using the "--delete" option in rsync
7- Made dovecot recalculate mailbox quota
8- Accesed my email through SOGo... but... it was just as yesterday, no old emails visible, just the new ones (from step 4)
9- And yes, I checked the ownerwhip and permissions in the restored vmail/vmail1 folder
10- I got scared and restored my backup from my 5th step with the "---delete" option to go back in time and come ask for guidance here

So I have all my old emails (around 2GB of work emails, so yes, this is kind of important for me) in a vmail/vmail1 backup folder, but I don't know how to import them to my current iRedMail installation.

Thanks in advance! smile

2

Re: Directly importing vmail/vmail1 mailboxes backup

While you re-create mail accounts, please make sure the maildir path stored in SQL db is same as the one on file system.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Directly importing vmail/vmail1 mailboxes backup

ZhangHuangbin wrote:

While you re-create mail accounts, please make sure the maildir path stored in SQL db is same as the one on file system.

In this case I have e-mail accounts already working well in my install and the only thing I did was to add my old "vmail1" folder (using rsync to keep the current files in it) to my already working vmail folder installation. I asume (maybe I'm wrong) that the database is not changed by that. And I can still access to any account and see my new emails, but not the "restored" ones. Should I still check the SQL database in case it has changed after the rsync?

4

Re: Directly importing vmail/vmail1 mailboxes backup

After rsynced, please make sure the mailbox files are owned by "vmail:vmail", permission 0700.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee