Hi there everyone!
I would like to use this script to backup my site's db's so my automated file backup solution will download them along with the files.
So the magic bits are:
$backupDatabase = new Backup_Database(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, CHARSET);
$result = $backupDatabase->backupTables(TABLES, BACKUP_DIR) ? 'OK' : 'KO';
$backupDatabase->obfPrint('Backup result: ' . $result, 1);
// Use $output variable for further processing, for example to send it by email
$output = $backupDatabase->getOutput();
My thinking is that I need to make the db credentials an array and I need to convert the last bit to work through it. The issue I have is that sometimes, there will be multiple DB names attached to the same user, so I need to set that up as a subarray of some sort.
db names: cats, dogs, dolphins
db names: bikes, cars, boats
db names: pizza
But I'm having problems figuring out how to convert this script to work through all available databases. Any help on doing this would be greatly appreciated.
Thanks for your time!