DatabaseBackup is a CakePHP plugin to export, import and manage database backups
OTHER License
Bot releases are hidden (Show)
Published by mirko-pagliai 5 days ago
php-tools
;CommandTestCase
;Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.13.1...2.13.2
php-tools
1.10.0.Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.13.0...2.13.1
Published by mirko-pagliai 10 months ago
Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.12.3...2.13.0
Published by mirko-pagliai 10 months ago
php-tools
1.8.Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.12.2...2.12.3
Published by mirko-pagliai 12 months ago
ExportCommand
and ImportCommand
, in handling some exceptions;me-tools
package. This removes several (useless) dependencies;BackuManager::index()
method, also regarding the correct files sorting. This also solves a small bug forrotate()
method (which precisely affects index()
). The index()
method now returns a collection of arrays (Entity
);BackupTrait::getDriverName()
method can no longer be static;BaseCommandTestCase
class;Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.12.1...2.12.2
Published by mirko-pagliai over 1 year ago
bootstrap.php
file;Exceptionist
class provided by me-tools is no longer used (in anticipation of an upcoming deprecation).Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.11.1...2.12.1
Published by mirko-pagliai over 1 year ago
Below is the complete changelog, but it is important to point out the most important things:
BackupExport
and BackupImport
classes extend the AbstractBackupUtility
class thus offering the common code used by both;BackupExport
and BackupImport
classes to execute commands in the shell, which are then executed directly by these classes.BackupExport
and BackupImport
, which interface with the driver classes to know exactly how to do it.Driver::_exec()
method has become AbstractBackupUtility::getProcess()
;BackupExport
and BackupImport
and no longer by the drivers themselves.BackupExport
is going to export a backup (Backup.beforeExport
event) it's like saying to the driver "hey, I'm going to export, do what you need to do and that's specific to your driver!";DatabaseBackup.processTimeout
configuration, thus allowing to set a timeout for commands executed in the shell, which is particularly useful for very large databases that require non-standard times to export/import backups. This was requested with issue #88, but this only allowed setting a global value (valid for the whole plugin).timeout()
method has been added for BackupExport
and BackupImport
classes and the --timeout
(-t
short) option has been added for the ExportCommand
and ImportCommand
, which allows you to set a timeout at runtime.BackupTrait
and available for the whole plugin, but really used in more specific contexts, and for this they have been moved. Other methods (internal and not accessible to the end user) offered unnecessary and unused arguments, which have been removed.DatabaseBackup.connection
. So these arguments have been removed and only the global configuration is used, as it would be anyway.In summary, even if the lines of code are the same due to the new implementations, all the code has been simplified, streamlined and made more effective.
Finally, the wiki was updated, as it was sometimes referencing functions/code that no longer exist. And the whole description of the code itself has been extensively revised.
Changelog:
AbstractBackupUtility::timeout()
method, so now BackupExport
/BackupImport
utilities have a method to set the--timeout
option (short: -t
) for ExportCommand
/ImportCommand
;Backup.beforeExport
, Backup.afterExport
, Backup.beforeImport
, Backup.afterImport
, which remainBackupExport::export()
and BackupImport::import()
AbstractBackupUtility
abstract class that provides the code common to BackupExport
and BackupImport
,AbstractBackupUtility::__get()
magic method for reading BackupExport
/BackupImport
properties;$Driver
public property for BackupExport
/BackupImport
and added AbstractBackupUtility::getDriver()
method;Driver
class has become AbstractDriver
and no longer takes a connection as constructor argument, butDriver::_exec()
method has been moved and has becomeAbstractBackupUtility::getProcess()
. The old Driver::export()
and Driver::import()
methods no longer exist andBackupExport::export()
and BackupImport::import()
methods;BackupTrait::getDriver()
method has become AbstractBackupUtility::getDriver()
;BackupTrait::getDriverName()
and AbstractBackupUtility::getDriver()
no longer accept a connection as argument, butBackupExport::export()
and BackupImport::import()
methods can return the filename path on success or false
Backup.beforeExport
/Backup.beforeImport
events are stopped;Driver::_getExecutable()
, Driver::_getExportExecutable()
and Driver::_getImportExecutable()
have becomeDriver::getExecutable()
, Driver::getExportExecutable()
and Driver::getImportExecutable()
;Driver::getConfig()
method no longer accepts null
as argument, but only a string as key, since there is noMySql::getAuthFile()
method has become getAuthFilePath()
, to be more understandable;MySql::deleteAuthFile()
method returns void (there is no need for it to return anything);TestCase::getMockForAbstractDriver()
method;BackupExport::$config
property;ExportCommand
class;BackupImportTest
tests.Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.11.1...2.12.0
Published by mirko-pagliai over 1 year ago
DatabaseBackup.processTimeout
configuration, which allows you to set a timeout for commands that will beImportCommand
/ExportCommand
will be implemented later;php-tools
1.7.4;Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.11.0...2.11.1
Published by mirko-pagliai over 1 year ago
MySql::getAuthFile()
method. So the MySql::$auth
property is now private;createBackup()
and createSomeBackups()
are now testing global functions and no longer methods provided by theTestCase
class;CommandTestCase
to test commands;This version also fixed the https://github.com/mirko-pagliai/cakephp-database-backup/issues/85 issue.
Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.10.2...2.11.0
Published by mirko-pagliai about 2 years ago
Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.10.1...2.10.2
Published by mirko-pagliai almost 3 years ago
php-tools
1.5.8.2.9.0
): all tracks are auto-discovered, by @mirko-pagliai in https://github.com/mirko-pagliai/cakephp-database-backup/pull/79
Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.9.1...2.10.1
Published by mirko-pagliai almost 3 years ago
__exportExecutableWithCompression()
and _importExecutableWithCompression()
Driver
class have been removed and incorporated_getExportExecutable()
and _getImportExecutable()
;BackupTrait::$validExtensions
has been removed and replaced by theDATABASE_BACKUP_EXTENSIONS
constant;2.9.0
): all tracks are auto-discovered, by @mirko-pagliai in https://github.com/mirko-pagliai/cakephp-database-backup/pull/79
Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.9.1...2.10.0-beta1
Published by mirko-pagliai almost 3 years ago
BackupTrait::getDriverName()
static method; getConnection()
andgetDriver()
methods are now static;2.9.0
): all tracks are auto-discovered,2.9.0
): all tracks are auto-discovered, by @mirko-pagliai in https://github.com/mirko-pagliai/cakephp-database-backup/pull/79
Full Changelog: https://github.com/mirko-pagliai/cakephp-database-backup/compare/2.9.1...2.9.2
Published by mirko-pagliai about 3 years ago
Published by mirko-pagliai about 3 years ago
symfony/process
to execute import and export shell commands. ThisDatabaseBackup.redirectStderrToDevNull
config key has been removed;mysql
. You candriver_test
or db_dsn
environmentphpunit
;Published by mirko-pagliai over 3 years ago
mkdir
errors are no longer suppressed;phpstan
Published by mirko-pagliai over 3 years ago
8.0
;Published by mirko-pagliai over 3 years ago
BackupManager::delete()
returns the full path;BackupManager
can now be called statically, exceptsend()
method;phpunit
9.Published by mirko-pagliai almost 4 years ago
php-tools
1.4.5;phpstan
, so fixed some code.Published by mirko-pagliai about 4 years ago
php-tools
1.4.1.