Download this FREE script:
http://dwalker.co.uk/phpmysqlautobackup/
and add to your app folder
Configure your db and email details in run.php
at top of run.php add the following code to control access to the file using AppGini and to give the page same looks of your app:
Code: Select all
<?php
$currDir = dirname(__FILE__);
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
include_once("$currDir/header.php");
?>
Code: Select all
<?php
include_once("$currDir/footer.php");
?>
In Links-home.php (hooks folder) add the following lines to create a button in your app:
Code: Select all
$homeLinks[] = array(
'url' => 'your app folder/run.php',
'title' => 'BackUp DataBase',
'description' => 'BackUp by email',
'groups' => array('2'),
'grid_column_classes' => '',
'panel_classes' => '',
'link_classes' => 'btn btn-danger',
'icon' => 'icon path'
);
Anytime you need to make a back up just click the button, that is it.
you can also use CRON job to automate the backup or from the same link above download phpJobScheduler which is a replacement for cron
have a nice backup