php mysql database backup procedures

Source: Internet
Author: User
Keywords Network programming PHP tutorial
Tags backup class data data backup data management database backup database security dated

php tutorial mysql tutorial database tutorial backup program
/ *
Provide an example of php mysql database backup procedures, a good way to your database for online real-time backup, so you can save the database security, and he is saved as a .sql file in the bakdata directory also generated date database backup file of.
* /

?>
<! doctype html public "- // w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text / html; charset = utf-8" />
<link type = "text / css tutorial" rel = "stylesheet" href = "common / control.css">
<script type = "text / webpage effect" language = "javascript" src = "common / admin.otable.js"> </ script>
<script type = "text / javascript" language = "javascript" src = "common / include.func.js"> </ script>
<title> Data Management </ title>
<style type = "text / css">
span {padding-left: 8px;}
</ style>
</ head>

<body class = "contentbody">
<div class = "maindiv">
<span class = "ctitle"> esweb System Data Management </ span>
<ul class = "cmenu">
<li> <a href="sql_backup.php"> Data Backup </a> </ li>
<li> <a href="sql_restore.php"> Data Restore </a> </ li>
<li> <a href="sql_optimize.php"> Data Optimization </a>
</ ul>

<div class = "concontent">
<? php

/ * -------------- Interface -------------- * / if (! $ _ Post ['act']) {/ * --- ------------------- * /
$ msgs [] = "The server backup directory is $ backup";
$ msgs [] = "For larger tables, it is highly recommended to use subvolume backups";
$ msgs [] = "Only select backup to server, in order to use sub-volume backup function";
// show_msg ($ msgs);
?>
<div class = "thead"> <span class = "left"> <img src = "images / icon2 / into.gif" align = "absmiddle" /> If you need to backup, restore or optimize <font color = "red" > Large amounts of data </ ​​font>, we recommend <a href="http://www.phome.net/ebak2010/" target="_blank"> Imperial Backup King 2010 </a> </ span> </ span> </ font> span class = "right"> </ span> </ div>
<form name = "myform" method = "post" action = "sql_backup.php">
<table cellpadding = "" cellspacing = "0" border = "0" width = "100%" class = "ctable" id = "otable" align = "center">
<tr>
<th colspan = "2"> esweb System Data Backup </ th>
</ tr>
<tr>
<td align = "right" width = "250"> Choose Backup Method </ td>
<td> <input type = "radio" name = "bfzl" value = "quanbubiao" checked = "checked" /> Back Up All Data
<input type = "radio" name = "bfzl" value = "danbiao" /> Back up single-sheet data
<select name = "tablename"> <option value = ""> Please select </ option>
<? php
$ d-> query ("show table status from $ mysqldb");
while ($ d-> nextrecord ()) {
echo "<option value = '". $ d-> f (' name '). "">. $ d-> f (' name '). "</ option>";}
?>
</ select> </ td>
</ tr>
<tr>
<td align = "right"> Choose Destination </ td>
<td> <input type = "radio" name = "weizhi" value = "server" checked = "checked" /> Backup to Server
<input type = "radio" name = "weizhi" value = "localpc" /> Back up to local </ td>
</ tr>

<tr>
<td align = "right"> Use Split Volume Backup </ td>
<td> <input type = "checkbox" name = "fenjuan" value = "yes" checked = "checked" />
Volume Backups <input name = "filesize" type = "text" value = "1260" size = "10" class = "text2" /> k <span> (Only backup backups can be used on the server) </ span> </ td>
</ tr>
<tr>
<td align = "right"> Program Description </ td>
<td> 1. For larger tables, it is highly recommended to use subvolume backups.
<br> 2. Only if you choose to back up to the server, you can use sub-volume backup function.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.