1

Topic: Hourly offserver backup of /var/vmail/vmail1/

==== 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:
====

Hi,

I understand with the default installation path of iredmail all emails will be stored under the /var/vmail/vmail1/ directory. Now, I want to backup this directory to an offsite location for disaster recovery reasons. I prefer to use s3cmd to sync the above folder with one my buckets created under Amazon S3. However, when I attempted to do so the s3cmd keeps failing (gets killed) after a while. Further investigation revealed it could be possibly s3cmd running out of available system memory  to process the requests.  The VPS only got about 2GB of RAM or so.

Also, I prefer that I backup the above mail folder on HOURLY basis. What is the best method that you recommend that I can backup the content to a remote server preferably amazon S3 (incremental backup is fine with only latest changes getting backed up).

----

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

2

Re: Hourly offserver backup of /var/vmail/vmail1/

*) Any plan to increase RAM and try again?
*) Is "rsync" an option for you?

3

Re: Hourly offserver backup of /var/vmail/vmail1/

ZhangHuangbin wrote:

*) Any plan to increase RAM and try again?
*) Is "rsync" an option for you?

Increasing the RAM is an option but my concern is how long that's going to lost... as the number of files continue to increase under /var/vmail/vmail1  directory, I think I am going to run into the problem again.

I could rsync the above folder to another Linux server.  I am looking for a straight forward restore situation where if I have to re-built the iredmail server from scratch, I want it to get everything working to a state just before I lost the primary server. What options/switches of rsync do you recommend that I use for backing up (or syncing) the above folder and retail all permissions, whatever I require to rebuilt the server again?

As mentioned before, I plan to sync/backup the above folder EVERY HOUR to a remote location.

I am also backing up the MySQL DBs... should I be doing an hourly backup on those as well? I rarely add/modify/delete users or change other settings within iredmail.

4

Re: Hourly offserver backup of /var/vmail/vmail1/

purathal wrote:

I am also backing up the MySQL DBs... should I be doing an hourly backup on those as well? I rarely add/modify/delete users or change other settings within iredmail.

iRedMail has a daily cron job to backup the SQL databases.