Este script permite que você faça backup do seu banco de dados MySQL no formato SQL ou GZip.
Permitindo que futuramente você volta a restaurá-lo caso ocorra alguma perda. Fácil de usar.
-- index.phpMySQL PHP Helper :: Main $page = split("/", getenv('SCRIPT_NAME')); $n = count($page)-1; $page = $page[$n]; $page = split(".", $page, 2); $extension = $page[1]; $page = $page[0]; $script = "$page.$extension"; $base_url = "https://".$_SERVER['SERVER_NAME']; $directory = $_SERVER['PHP_SELF']; $script_base = "$base_url$directory"; $base_path = $_SERVER['PATH_TRANSLATED']; $root_path_www = $_SERVER['DOCUMENT_ROOT']; $remove_end = strrchr($root_path_www,"/"); $root_path = ereg_replace("$remove_end", '', $root_path_www); $url_base = "$base_url$directory"; $url_base = ereg_replace("$script", '', "$_SERVER[PATH_TRANSLATED]"); ?>
MySQL PHP Backup :: Help
MySql Php Backup © 2003 by AB Webservices
MySQL PHP Backup has been tested on Linux 2.4.18 running PHP 4.1.2+ and MySQL 3.23.47+. USE AT YOUR OWN RISK.
For zipped download PHP must be compiled with GZIP.
Step One: Create a sub-directory in your public directory for the MySQL PHP Backup files. Make sure that you can run PHP files from this sub-directory. You must place the index.php, backup.php, restore.php, and delete.php files in the sub-directory that you created. Also, permission for this sub-directory must be 777 and permission for the above listed PHP files must be 644 in order for this program to process your requests, along with the ability to write files to your account. Calling the index.php from your browser will run this program.
Step Two: You must do a backup before any other request below. Default values have been placed in the below form, but you need to ensure their accuracy for this script to process your requests. This script will generate a backup directory that will contain the backup file and a file containing the information you submit using the below form.
Creating a backup will overwrite any other backup made from this script. Doing a restore will overwrite your database tables with the backup file data generated from this script. The database password must be entered as safety measure. Doing a delete will delete from your backup the files that this program generates. In case the file backup.sql is no longer on your server you will have to upload backup.sql or backup.gz to your server after recreating the /dump dir (see create backup) in order to restore.- After downloading the backup, delete it from the server.