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.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

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.

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.

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.

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.