Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Nov 8, 2024
1 parent c74551d commit 6e2c0f9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/DbDumperComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,17 @@ public function dump()
"Folder to store the backup file is not found and could not be created").": ".$this->backupDirPath);
}

$filePath = $this->backupDirPath."/db__".date('Y-m-d_H-i-s').".sql";
$filePath = $this->backupDirPath."/db__".date('Y-m-d_H-i-s').".sql.gz";

$dump = new Mysqldump($this->connection->dsn, $this->connection->username, $this->connection->password, [
//'compress' => Mysqldump::GZIP
'compress' => Mysqldump::GZIP
]);

$dump->setTableLimits(array(
'log_db_target' => 1,
'cms_session' => 1,
));

$dump->start($filePath);

return $filePath;
Expand Down

0 comments on commit 6e2c0f9

Please sign in to comment.