Add date to db backups
This commit is contained in:
parent
921da75891
commit
3b7c037d83
@ -15,7 +15,8 @@ class BackupService
|
||||
public function backup(string $db, ?string $fileName = null): string
|
||||
{
|
||||
if (!$fileName) {
|
||||
$fileName = sprintf('%s_backup.sql', $db);
|
||||
$date = date('y_m_d_H_i');
|
||||
$fileName = sprintf('%s_%s_backup.sql', $db, $date);
|
||||
}
|
||||
|
||||
$filesystem = new Filesystem();
|
||||
|
Loading…
Reference in New Issue
Block a user