1

Topic: How to backup everything including all emails?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

I am currently taking an offsite backup of the /var/vmail/backup folder. Now, it appears the backups in that folder contain only the MySQL DBs of everything including iRedAdmin Pro, Sogo, etc. 

Where are the actual emails are stored? What folder should I be backing up in addition to the above if I have to do a complete restore of my mail server (including all mailboxes and associated emails)?

Secondly, does the current backup script actualy do a retention of the backups it takes?

Thanks.

2

Re: How to backup everything including all emails?

purathal wrote:

Where are the actual emails are stored?

/var/vmail/vmail1 by default.

purathal wrote:

Secondly, does the current backup script actualy do a retention of the backups it takes?

If your backup script under /var/vmail/backup/ contains parameter 'KEEP_DAYS=', then it will just keep the backup copies for 90 days, older copies will be removed after backing up new copy.

----

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: How to backup everything including all emails?

ZhangHuangbin wrote:

var/vmail/vmail1 by default.

Thanks. So, the above folder should also be backed up on regular basis in order to achieve a full restore, right? I wish the following document also talks about that portion of the backup, http://www.iredmail.org/docs/backup.restore.html as it currently misleads to think DBs are the only things that should be backed up.


ZhangHuangbin wrote:

If your backup script under /var/vmail/backup/ contains parameter 'KEEP_DAYS=', then it will just keep the backup copies for 90 days, older copies will be removed after backing up new copy.

Good to know.. I will look for that parameter setting.

4

Re: How to backup everything including all emails?

purathal wrote:

So, the above folder should also be backed up on regular basis in order to achieve a full restore, right?

Yes.

purathal wrote:

I wish the following document also talks about that portion of the backup, http://www.iredmail.org/docs/backup.restore.html as it currently misleads to think DBs are the only things that should be backed up.

Updated this doc moment ago and mentions mailbox backup.

----

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

buy me a cup of coffee

5

Re: How to backup everything including all emails?

If I rsync /vmail/backup and /vmail/vmail1 folders then I recieve some symlink copy errors. Is this a problem while restoring if some symlinks like /username/sieve/dovecot.sieve" -> "managesieve.sieve" are missing?

6

Re: How to backup everything including all emails?

raudraido wrote:

Is this a problem while restoring if some symlinks like /username/sieve/dovecot.sieve" -> "managesieve.sieve" are missing?

Make sure your rsync has argument "-a" or "-l", it will sync the symbol links.

----

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

buy me a cup of coffee

7

Re: How to backup everything including all emails?

ZhangHuangbin wrote:
raudraido wrote:

Is this a problem while restoring if some symlinks like /username/sieve/dovecot.sieve" -> "managesieve.sieve" are missing?

Make sure your rsync has argument "-a" or "-l", it will sync the symbol links.


I have -a, but as I understand then ciffs to NTFS machine wont work. NTFS does not understand symlinks.

8

Re: How to backup everything including all emails?

Can someone please disable 2FA on my account? I don’t know if this issue got fixed, but I switched to FP3 so authenticator app lost the Fairphone entry regardless.

Now I’m switching e-mail provider, and it requires a 2FA verification.

9 (edited by amelbeach 2020-08-22 05:34:28)

Re: How to backup everything including all emails?

Email outside of an email server is going to work differently than email on a server, so there's a bit of a distinction between a backup and an archive. Generally when you're talking about a backup, regardless of how the backup system works (eg, a cloned hard drive, a cloud backup, or a Time Machine backup, the workings of the last two being opaque), the thing you get out of the backup is the same as the thing that went in. With email, that's not usually the Kodi nox case.