PHP Classes

File: test_mysqlhotbackup.php

Recommend this page to a friend!
  Classes of Orazio Principe   MySQL Hot Backup Tool   test_mysqlhotbackup.php   Download  
File: test_mysqlhotbackup.php
Role: Example script
Content type: text/plain
Description: Example
Class: MySQL Hot Backup Tool
Backup a MySQL database copying tables to another
Author: By
Last change: Accessible without user login
Date: 10 years ago
Size: 794 bytes
 

Contents

Class file image Download
<?php

/**
 * Simple test to show how to use the class
 *
 * @author : Principe Orazio (orazio.principe@gmail.com)
 * @websites: http://principeorazio.wordpress.com http://www.dbpersister.com
 * @version : 1.1
 * @date : 24/10/2011
 *
 *
 * @license http://www.opensource.org/licenses/lgpl-3.0.html
 */

ini_set("max_execution_time", "0");
require_once(
"MySqlHotBackup.php");

$source_database = "wordpress";
$dest_database = "wordpress_bck";

$msb = new MySqlHotBackup($source_database, $dest_database);

$msb->setSourceServer("localhost", "root", "");
$msb->setDestinationServer("localhost", "root", "");

$msb->setDebugMode(true);
$msb->setChangeMyIsamToInnoDB(false);
$msb->setMaxPendingRows(10000);
$msb->setSqlMaxConcurrentRows(100);

$msb->run();