* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ ##################################################################################################################### # Include the class # ##################################################################################################################### require_once("iam_backup.php"); /** * Creates a Database dump for all the DBs listed in the Array * @param Array Contains Strings identifying the DBs to dump */ function toAllDB($dbs) { $now = gmdate('Y.m.d.H.i.s'); if (!file_exists("./$now")) { mkdir("./$now"); } while (list ($key, $val) = each ($dbs) ) { echo "$key => $val
"; $backup = new iam_backup("localhost", $val, "root", "", false, false, true, "./$now./$val.$now.sql.gz"); $backup->perform_backup(); } } ##################################################################################################################### # Set the DBnamos to backup and call the function # ##################################################################################################################### $fruits[0] = "intranetsk"; $fruits[1] = "mysql"; $fruits[2] = "law"; toAllDB($fruits); ?>