1

Topic: Cron backup_mysql.sh

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

I regularly see these errors. Any idea what might be causing it?

mysqldump: Got error: 1049: "Unknown database '...'" when selecting the database
mysqldump: Got error: 1049: "Unknown database '...'" when selecting the database
mysqldump: Got error: 1049: "Unknown database '...'" when selecting the database
mysqldump: Got error: 1049: "Unknown database '...'" when selecting the database
mysqldump: Got error: 1049: "Unknown database '...'" when selecting the database
mysqldump: Got error: 1049: "Unknown database '...'" when selecting the database ==> Backup completed successfully.
==> Detailed log (/var/vmail/backup/mysql/2020/01/28/2020.01.28.03.30.01.log):
=========================
* Starting backup: 2020.01.28.03.30.01.
* Backup directory: /var/vmail/backup/mysql/2020/01/28.
* Backing up databases ...
  - mysql [DONE]
  - vmail [DONE]
  - policyd [DONE]
  - amavisd [DONE]
  - roundcubemail [DONE]
  - iredadmin [DONE]
  - iredapd [DONE]
* File size:
----
4.0K    /var/vmail/backup/mysql/2020/01/28/amavisd-2020.01.28.03.30.01.sql.bz2
4.0K    /var/vmail/backup/mysql/2020/01/28/iredadmin-2020.01.28.03.30.01.sql.bz2
4.0K    /var/vmail/backup/mysql/2020/01/28/iredapd-2020.01.28.03.30.01.sql.bz2
4.0K    /var/vmail/backup/mysql/2020/01/28/mysql-2020.01.28.03.30.01.sql.bz2
4.0K    /var/vmail/backup/mysql/2020/01/28/roundcubemail-2020.01.28.03.30.01.sql.bz2
4.0K    /var/vmail/backup/mysql/2020/01/28/vmail-2020.01.28.03.30.01.sql.bz2
----
* Backup completed (Success? YES).

----

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

2 (edited by Cthulhu 2020-01-29 02:11:54)

Re: Cron backup_mysql.sh

The database policyd does not exist, but the script tries to backup it.
Modify the backup script and remove policyd from the databaes to backup, that should fix it

In iRedMail-0.9.2 and earlier releases, Policyd or Cluebringer listens on port 10031. They have been removed in iRedMail-0.9.3, and replaced by iRedAPD.

3

Re: Cron backup_mysql.sh

Thanks for that, I should have spotted it!