From e1b2e68d4b636ae58d9de62a5a684a8889f22762 Mon Sep 17 00:00:00 2001 From: Martin Gojowsky Date: Wed, 10 Jun 2015 11:52:20 +0200 Subject: [PATCH 1/3] Bugfix for missing databases with Multidump users, see http://forum.mysqldumper.de/post47665.html#t47665 --- inc/functions.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index a7b6e08..85a1ab5 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -410,13 +410,20 @@ function WriteCronScript($restore_values = false) $newDbNames = $databases['Name']; //remove database we don't want to backup - foreach ($databases['Name'] as $k => $v) { + // from newDbNames + foreach ($databases['Name'] as $k=>$v) { + if (in_array($v, $dontBackupDatabases)) { + unset($newDbNames[$k]); + } + } + // and from cron (cron_db_array has different length to newDbNames: at least mysql and information_schema are missing) + foreach ($cron_db_array as $k=>$v) { if (in_array($v, $dontBackupDatabases)) { unset($cron_db_array[$k], $cron_dbpraefix_array[$k], $cron_command_before_dump[$k], - $cron_command_after_dump[$k], - $newDbNames[$k]); + $cron_command_after_dump[$k] + ); } } From 0e7006298d49674b607088591c48e04c31bc34dc Mon Sep 17 00:00:00 2001 From: Martin Gojowsky Date: Wed, 10 Jun 2015 12:11:43 +0200 Subject: [PATCH 2/3] prevent accidential commit/push of config and work directory --- .gitignore | 3 +++ config.php => config.default.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) rename config.php => config.default.php (99%) diff --git a/.gitignore b/.gitignore index 485dee6..83aeb39 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .idea +/work/ +/config.php +/test.php diff --git a/config.php b/config.default.php similarity index 99% rename from config.php rename to config.default.php index c8809d5..1ca658f 100644 --- a/config.php +++ b/config.default.php @@ -123,4 +123,4 @@ $config['multi_dump']=0; $config['logcompression']=1; $config['log_maxsize1']=1; $config['log_maxsize2']=2; -$config['log_maxsize']=1048576; \ No newline at end of file +$config['log_maxsize']=1048576; From ebaec86cccb74482bc09a450daddfbc8effd9154 Mon Sep 17 00:00:00 2001 From: Martin Gojowsky Date: Wed, 10 Jun 2015 12:18:06 +0200 Subject: [PATCH 3/3] removed test file from gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 83aeb39..172c8a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ .idea /work/ /config.php -/test.php