My default profile using file name pattern '[site-name]' and 'Append timestamp' enabled with 'Y-m-d' as the format. My scheduled backups (all using the default backup profile) are creating files like DaveReid-2011-11-08-2011-11-08.mysql.gz.

Comments

dave reid’s picture

Interesting to note that this seems to happen when you have multiple scheduled backups that run at the same time.

First scheduled backup: DaveReid-2011-11-08.mysql.gz
Second: DaveReid-2011-11-08-2011-11-08.mysql.gz
Third: DaveReid-2011-11-08-2011-11-08-2011-11-08.mysql.gz

dave reid’s picture

I believe the problem is in backup_migrate_perform_backup() which alters $settings by reference and hence $settings->filename is altered every time.

/**
 * Perform a backup with the given settings.
 */
function backup_migrate_perform_backup(&$settings) {
  ...
  if ($settings->append_timestamp && $settings->timestamp_format) {
    // Second and third time this statement is called it continues to append
    $settings->filename .= "-". date($settings->timestamp_format); 
  }
  // Tokens have already been replaced the first time, so this does not affect the file name.
  $settings->filename = _backup_migrate_clean_filename($settings->filename); 
  ...
magnusk’s picture

I've noticed the same issue in v7.x-2.2

ronan’s picture

Status: Active » Fixed

I think this has been fixed for a while. It is FOR SURE fixed in the 3.x branch

Status: Fixed » Closed (fixed)

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