Commit 7b8f72d6 authored by anarcat's avatar anarcat Committed by anarcat

include the time in the backup file so we know when the backup was done,...

include the time in the backup file so we know when the backup was done, regardless of the timestamp
parent 0d78a4b9
......@@ -30,12 +30,12 @@ function drush_provision_drupal_provision_backup_validate($url = NULL, $backup_f
}
if (!$backup_file) {
$suggested = drush_get_option('backup_path') ."/$url-". date("Y-m-d", mktime()) .".tar.gz";
$suggested = drush_get_option('backup_path') ."/$url-". date("Ymd.His", mktime()) .".tar.gz";
// Use format of mysite.com-2008-01-02, if already existing, add number.
while (is_file($suggested)) {
$count++;
$suggested = drush_get_option('backup_path') ."/$url-". date("Y-m-d", mktime()) ."_$count.tar.gz";
$suggested = drush_get_option('backup_path') ."/$url-". date("Ymd.His", mktime()) ."_$count.tar.gz";
}
drush_set_option('backup_file', $suggested);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment