Topic: [Bug+FetureRequest] no error warining in Mysql Backup Script
summary
bug:
* there is no error shown on database connection error in the backup script; there should be a warning message in the command
* the backup integrity should be checked, to small files should result in a warning
feature:
+ there should be a warning message in the admin interace if backup is failing
+ the backup system should also being automatically installed and setup in the installation wizard (including cron setup)
+ the backup system also should be able to backup the maildir
+ only one backup script has to be called. the script do the rest.
+ a section in the admin where i can see when the last backups where running, how big the files are, and an option to keep only the last x backups (like in http://www.activecollab.com/docs/manual … ta-backup)
+ backups should be easily restoreable. just setup a blank iredmail server; copy one large backup zip; call the restore script; everything should be up and running.
longer version:
as iredmail is such a great "fire & forget" system (have never installed a mailserver so fast), also the backup system should be that easy and integrated.
root@server ~/iRedMail-0.7.0-rc1/tools # bash backup_mysql.sh
root@server ~/iRedMail-0.7.0-rc1/tools #
if i install the system and brain-afk assume that the install scripts also sets the password and names in the backup script i run into the situation, that i create a lot of backups with the script and if i have to rely on the backup it can be a bad supprise that all the sql files are empty because the backup script had no database connection. which can also happen if a anything prevents the mysql server connection (for the moment, for this one program, allways,...).
the backup script should show a warning message on a db connection error. best would be that if i log into the admin interface i see a warning "your backup is failing"
the logfile shows the problem (should also tell me "backup completed with errors" on the last line):
* Starting backup: 2011.05.11.15.04.44.
* Log file: /backup/logs/2011.05//mysql-2011.05.11.15.04.44.log.
* Backup copies: /backup/mysql/2011.05/2011.05.11.
* Backing up database: mysql...mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
Done
* Backing up database: vmail...mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
Done
* Backing up database: policyd...mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
Done
* Backing up database: roundcubemail...mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
Done
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.14.22.39.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.14.22.39.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.14.28.35.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.14.28.35.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.15.04.44.sql... Done
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.14.22.39.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.14.22.39.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.14.28.35.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.14.28.35.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.15.04.44.sql... Done
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.14.22.39.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.14.22.39.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.14.28.35.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.14.28.35.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.15.04.44.sql... Done
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.14.22.39.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.14.22.39.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.14.28.35.sql.bz2...bzip2: Input file /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.14.28.35.sql.bz2 already has .bz2 suffix.
* Compressing plain SQL file: /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.15.04.44.sql... Done
* File size:
4.0K /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.14.22.39.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.14.28.35.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/mysql.2011.05.11.15.04.44.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.14.22.39.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.14.28.35.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/policyd.2011.05.11.15.04.44.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.14.22.39.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.14.28.35.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/roundcubemail.2011.05.11.15.04.44.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.14.22.39.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.14.28.35.sql.bz2
4.0K /backup/mysql/2011.05/2011.05.11/vmail.2011.05.11.15.04.44.sql.bz2
* Backup complete.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.