Skip to content

Commit d439830

Browse files
glamorousfreekmurze
authored andcommitted
spatie#662 - Remove the dumped database file after gzipping it (spatie#663)
1 parent cce6dd7 commit d439830

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Tasks/Backup/BackupJob.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Exception;
66
use Carbon\Carbon;
7+
use Illuminate\Http\File;
78
use Spatie\DbDumper\DbDumper;
89
use Illuminate\Support\Collection;
910
use Spatie\DbDumper\Databases\Sqlite;
@@ -236,6 +237,7 @@ protected function dumpDatabases(): array
236237
consoleOutput()->info("Gzipping {$dbDumper->getDbName()}...");
237238

238239
$compressedDumpPath = Gzip::compress($temporaryFilePath);
240+
File::delete($temporaryFilePath);
239241

240242
return $compressedDumpPath;
241243
}

0 commit comments

Comments
 (0)