PHP Classes

File: start.php

Recommend this page to a friend!
  Classes of Istvan Dobrentei   PHP MySQL Remote Backup   start.php   Download  
File: start.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP MySQL Remote Backup
Backup MySQL databases to FTP server files
Author: By
Last change:
Date: 8 years ago
Size: 532 bytes
 

Contents

Class file image Download
<?php
require 'vendor/autoload.php';
use
Distvan\Backup;

$config = array(
 
'db_host' => '127.0.0.1', //database host
 
'db_name' => array('database1', 'databas2', 'database3'), //list of databases to dump
 
'db_user' => '', //database username
 
'db_pass' => '', //database password
 
'ftp_host' => 'ftp.domain.com',
 
'ftp_user' => '', //ftp username
 
'ftp_pass' => '', //ftp password
 
'ftp_remote_dir' => 'remote-folder-name',
 
'ftp_local_dir' => 'temp',
 
'max_backup_size' => 4 //Mbyte
);
$backup = new Backup($config);
?>