backup-filenames without time
-
For a while now, my db-backups have wrong filenames allowing diffferent backups (in the WP-admin) but pointing to the same file on the server.
This happens only if I make several backups on the same day (and using the same AUTH_KEY).I get filenames containg the YEAR but not the TIME like:
‘SITENAME_2019_09_27__0123456_wpdb.zip‘ (note double ‘__’)
so a 2nd backup on the same day results in the same filename (‘0123456’ is a substring of AUTH_KEY)!/includes/adminclass-wpdb-admin.php, line 1724:
$WPDBFileName = $siteName . '_' . Date("Y_m_d") . '_' . Time("H:M:S") . "_" . substr(md5(AUTH_KEY), 0, 7) . '_wpdb';
Changing Time(“H:M:S”) to time() fixed the problem for me. So now I get filenames like
SITENAME_2019_09_28_1569689467_0123456_wpdb.zip
Reason: time() expects no params!
- The topic ‘backup-filenames without time’ is closed to new replies.