Regression from #881496: Problem migrating sites with mysql views

The sed pipe that was added hides the return code of the mysql dump command. So the check we do afterwards just confirms that the sed util worked....

This is a return of: #494376: backup succeeds even if database connexion fails

One quick fix is to test the resulting filesize.
An easy way to test this is to temporarily modify the database password in safe_shell_exec()

Comments

danquah’s picture

Status: Needs review » Reviewed & tested by the community

Works as advertised.

Did 2 x provision-backup, one on a clean 6.x-2.x-dev, and one after hacking safe_shell_exec to use the wrong password

$ ls -l
total 76
-rw-r--r-- 1 aegir aegir 65487 Sep 27 11:14 test-20130927.111408.tar.gz
-rw-r--r-- 1 aegir aegir  6552 Sep 27 11:16 test-20130927.111611.tar.gz

Both executions where reported as successful even though the last backup is clearly smaller. After applying the patch I get the following

$ drush @test provision-backup
Could not generate database backup from mysqldump. (error: mysqldump: Got error: 1045: Access denied for [error]
user 'test'@'localhost' (using password: YES) when trying to connect
)
Deleted mysql dump from sites directory                                                                  [success]
anarcat’s picture

Status: Reviewed & tested by the community » Fixed

committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit f699c07 on 6.x-2.x, 7.x-3.x, 6.x-2.x-backports, dev-helmo-3.x authored by helmo, committed by anarcat:
    Issue #2098289 by helmo: Fixed Backup task does not detect failed...