Stream input of sql file when restoring backup. Makes everything better and faster

This commit is contained in:
Tim 2023-09-29 11:15:40 +02:00
parent d6b4ef4497
commit 0a2a06fb8a

View File

@ -42,8 +42,10 @@ class BackupService
$db,
]);
$stream = fopen($fileName, 'r');
$process->setEnv(['MYSQL_PWD' => $this->credentials->getPassword()]);
$process->setInput(file_get_contents($fileName));
$process->setInput($stream);
$process->run();
}
}