The "drush bb" command returns the message "Failed to compress the backup file. Try to perform a backup without compression."
Maybe the problem is in the OS settings. But I tried to do it on different machines, the result is the same.

Full error code:

$ drush bb                                                                                                                                                                                                                                                   [error]
WD backup_migrate: Could not compress backup file. Try backing up without compression.                                                                                                                                                                     [error]                                                                                                                                                                                                                                                         [error]
WD backup_migrate: Could not complete the backup.
 

Comments

Yuriy Mudriy created an issue. See original summary.

couturier’s picture

Status: Active » Postponed (maintainer needs more info)

Please try upgrading to the 7.x-3.2 version released September 27, 2017, and see if this resolves your issue.

couturier’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing after more than two weeks with no activity.

Yuriy Mudriy’s picture

Status: Closed (won't fix) » Active
Yuriy Mudriy’s picture

Bug still exists in version: 7.x-3.5
May be related: https://www.drupal.org/project/backup_migrate/issues/1564408

couturier’s picture

@Yuriy Mudriy on comment #5, I'm not really sure if those issues are related. The one to which you linked is creating a double compression that is unreadable as a .gz file. This issue is more an error message stating that compression cannot occur in the first place. Do you know which of these two problems you might be having? Can you give us a copy of your error messages? Thanks.

DamienMcKenna’s picture

Assigned: Yuriy Mudriy » Unassigned
Issue tags: -drush, -drupal 7, -backup_migrate, -Backup and Migrate, -message, -db

It'd be useful to add some hook_requirements / UI notes about which compression methods are available.

solideogloria’s picture

I just experienced this error while testing an upgrade to PHP 7.2. Does zipping the file require a certain PHP extension?

solideogloria’s picture

I had to install php-pecl-zip, which fixed the error.

yum install php-pecl-zip
systemctl restart php-fpm
php -m

Personally, I don't think this issue is related to the module at all, but rather to which PHP extensions are installed. I agree that adding hook_requirements would be useful, especially if backups are set to zip and the zip extension is not loaded. Maybe something like this, though you'd need to add some settings checks as well as check for gzip or other types:

/**
 * Implements hook_requirements().
 */
function backup_migrate_requirements($phase) {
  $requirements = array();

  // Make sure we have the zip extension enabled.
  if ($phase == 'runtime') {
    $driver = 'zip';
    $requirements['zip'] = array(
      'title' => t('ZIP File Compression'),
      'value' => $driver,
      'severity' => REQUIREMENT_OK,
    );
    if (!extension_loaded($driver)) {
      $requirements['zip']['severity'] = REQUIREMENT_ERROR;
      $requirements['zip']['value'] = t('Missing');
      $requirements['zip']['description'] = t('The %driver driver for PHP is required for zipping backup files.', array('%driver' => $driver));
    }
  }

  return $requirements;
}
joelpittet’s picture

We ran into this too, but we'd just installed zip extension but forgot to reload Apache/PHP-FPM so when the backup ran it was in a weird state where it tried to zip but failed.

solideogloria’s picture

Title: Could not compress backup file. Try backing up without compression. » Add hook_requirements check for supported compression methods.
Category: Bug report » Feature request