1

Topic: Backup duplicate DB in backup_mysql.sh

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

I noticed an issue in the output of
/var/vmail/backup/backup_mysql.sh

There seemed to be uncompressed AND compressed copies of some backup files.

* Starting backup: 2019-10-02-03-30-01.
* Backup directory: /var/vmail/backup/mysql/2019/10/02.
* Backing up databases: vmail iredadmin mysql mysql amavisd iredapd sogo roundcubemail iredadmin.
* File size:
----
216K    amavisd-2019-10-02-03-30-01.sql.bz2
60K    iredadmin-2019-10-02-03-30-01.sql.    <--------------------
8.0K    iredadmin-2019-10-02-03-30-01.sql.bz2
72K    iredapd-2019-10-02-03-30-01.sql.bz2
504K    mysql-2019-10-02-03-30-01.sql    <--------------------
100K    mysql-2019-10-02-03-30-01.sql.bz2
4.0K    roundcubemail-2019-10-02-03-30-01.sql.bz2
1.1M    sogo-2019-10-02-03-30-01.sql.bz2
16K    vmail-2019-10-02-03-30-01.sql.bz2
----
* Backup completed (Success? YES).
* Delete old backup: /var/vmail/backup/mysql/2019/07/04.
* Suppose to delete: /var/vmail/backup/mysql/2019/07/04

Investigation showed the variable DATABASES has duplicate entries.
I removed the duplicates as shown here:

#export DATABASES="vmail iredadmin mysql mysql amavisd iredapd sogo roundcubemail iredadmin"
export DATABASES="vmail iredadmin mysql amavisd iredapd sogo roundcubemail"

Thanks, Rob.

----

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

2

Re: Backup duplicate DB in backup_mysql.sh

I didn't figure out which part of iRedMail installer causes this duplicate database names sad

3

Re: Backup duplicate DB in backup_mysql.sh

ZhangHuangbin wrote:

I didn't figure out which part of iRedMail installer causes this duplicate database names sad

Ok.  I'm fairly sure I didn't add them, and maybe this has been resolved in your script previously - or just stuff happens.

Good that it is not occurring with the current installer script.

Rob.