asp怎么进行数据库备份 10
一个网站要进行数据库的备份,那不知道具体是怎么样的流程,有了解的朋友,可以跟我说一下吗,谢谢了!!...
一个网站要进行数据库的备份,那不知道具体是怎么样的流程,有了解的朋友,可以跟我说一下吗,谢谢了!!
展开
展开全部
要加分哦
我可是把整个代码都贴出来了
用着可好用 我正用的
有两个
一个简单的下面是代码
<form name="form1" method="post" action="?action=bf">
备份原数据库路径:
<input name="text1" type="text" id="text1">
<p>备份目标数据库路径:
<input name="text2" type="text" id="text2">
</p>
<p>
<label>
<input type="submit" name="Submit" value="备份">
</label>
</p>
</form>
<%
Function CopyFiles(TempSource,TempEnd)
Dim FSO
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(TempEnd) then
Response.Write "目标备份文件 <b>" & TempEnd & "</b> 已存在,请先删除!"
Set FSO=Nothing
Exit Function
End IF
IF FSO.FileExists(TempSource) Then
Else
Response.Write "要复制的源数据库文件 <b>"&TempSource&"</b> 不存在!"
Set FSO=Nothing
Exit Function
End If
FSO.CopyFile TempSource,TempEnd
Response.Write "已经成功复制文件 <b>"&TempSource&"</b> 到 <b>"&TempEnd&"</b>"
Set FSO = Nothing
End Function
if request("action")="bf" then
ff=server.MapPath(request("text1"))
aa=server.MapPath(request("text2"))
call CopyFiles(ff,aa)
end if
%>
**************************************我是分割线************************
还有复杂的
<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=gb2312" />
<title>数据库备份系统</title>
<style type="text/css">
<!--
body {
background-color: #F4FFD2;
margin-left:5px;
margin-top: 15px;
margin-right: 5px;
margin-bottom: 10px;
}
html{
font-size:12px;
scrollbar-face-color:#99cc66;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#F4FFD2;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-highlight-color:#fcfcfc;
scrollbar-shadow-color:#99cc00;
scrollbar-darkshadow-color:#99cc66;
}
input{background-color:#FFFFFF;
border-color:#333333;
border:1px;
font-style:normal;
}
.title {
FONT-SIZE: 18px; COLOR: #010000; FONT-FAMILY: "黑体"
}
A:hover {
COLOR: #f18b01; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
TD {
FONT-SIZE: 9pt; COLOR: #666666; WORD-BREAK: break-all; LINE-HEIGHT: 170%; TEXT-DECORATION: none
}
.白字 {
COLOR: #ffffff
}
.company {
FONT-SIZE: 12px; COLOR: #2b2b2b; LINE-HEIGHT: 22px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.dot {
FONT-SIZE: 12px; COLOR: #aeaeae; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.news {
FONT-SIZE: 12px; COLOR: #515151; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.word {
FONT-SIZE: 12px; COLOR: #6f6f6f; LINE-HEIGHT: 18px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.caption_dark {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.caption_simple {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.button {
FONT-SIZE: 12px; COLOR: #666666; TEXT-DECORATION: none
}
.date {
FONT-SIZE: 10px; COLOR: #acacac; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.doman {
FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #0a52af; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.form {
BORDER-RIGHT: #e0e0e0 1px solid; BORDER-TOP: #e0e0e0 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #e0e0e0 1px solid; COLOR: #333333; BORDER-BOTTOM: #e0e0e0 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #f7f7f7
}
.web_button {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #616e43; TEXT-DECORATION: none
}
.bbs_user {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ff6600; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.bbs_user_simple {
FONT-SIZE: 12px; COLOR: #575757; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.menu {
FONT-SIZE: 12px; COLOR: #e4e4e4; TEXT-DECORATION: none
}
.copright {
FONT-SIZE: 12px; COLOR: #333333; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.bt_word {
FONT-SIZE: 12px; COLOR: #333333; LINE-HEIGHT: 18px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.list {
FONT-SIZE: 12px; COLOR: #424242; FONT-FAMILY: "??"; TEXT-DECORATION: none
}
.list_class {
FONT-SIZE: 12px; COLOR: #808080; FONT-FAMILY: "???"; TEXT-DECORATION: none
}
.page {
FONT-SIZE: 12px; COLOR:#000000; TEXT-DECORATION: none
}
.bbs_bt {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; TEXT-DECORATION: none
}
.bbs_bt_simple {
FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #545454; TEXT-DECORATION: none
}
.bbs_list_word {
FONT-SIZE: 12px; COLOR: #171717; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.case {
FONT-SIZE: 12px; COLOR: #5a5e61; LINE-HEIGHT: 18px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.date_simple {
FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.product_bt {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #333333; LINE-HEIGHT: 16px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.prodcut {
FONT-SIZE: 12px; COLOR: #505050; LINE-HEIGHT: 16px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.form2 {
BORDER-RIGHT: #989898 1px solid; BORDER-TOP: #989898 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #989898 1px solid; COLOR: #333333; BORDER-BOTTOM: #989898 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #f6f6f6
}
.button3 {
FONT-SIZE: 12px; COLOR: #7b7b7b; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.bt1 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #717171
}
.bt_line {
FONT-SIZE: 14px; COLOR: #547db2; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.bt2 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ff9501; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
A.nav:link {
FONT-SIZE: 12px; COLOR: #ffffff; TEXT-DECORATION: none
}
A.nav:visited {
FONT-SIZE: 12px; COLOR: #ffffff; TEXT-DECORATION: none
}
A.nav:hover {
FONT-SIZE: 12px; COLOR: #ffff00; TEXT-DECORATION: none
}
<font face="Verdana, Arial, Helvetica, sans-serif">
.sb{color:#000000;font-size:13px;text-decoration:none}
a.sb:visited{color:#6699FF;font-size:13}
a.sb:link{color:#3399CC;font-size:13px}
.tomg { color: #666666; font-size:12px; text-decoration:none}
a.tomg:link {color: #666666; text-decoration:none}
a.tomg:visited {color: #666666; text-decoration:none}
a.tomg:hover { color:#FF3300; font-size:14px;text-decoration:none}
.00 { color:#333333; font-size:12px; text-decoration:none}
a.00:hover { color: #FF6666; text-decoration:underline}
a.00:link {color: #666666; text-decoration:none}
a.00:visited {color: #000000; text-decoration:none}
a.bb:link {color:#666666; text-decoration:none;cursor:hand;font-weight:bold}
a.bb:visited {color: #666666; text-decoration:none;cursor:hand;font-weight:bold}
a.bb:hover {color: #CC0000; text-decoration:underline;cursor:hand;font-weight:bold}
.cc{color:#FFFFFF;font-size:12px;text-decoration:none}
.tomg1 { color: #000000; font-size:12px;letter-spacing:1.5; word-spacing:1;line-height:2;text-decoration:none}
a.tomg1:link {color: #000000; text-decoration:none}
a.tomg1:visited {color: #000000; text-decoration:none}
a.tomg1:hover { color:#99CC33 ; text-decoration:none}
.style1 {color: #000000}
.style2 {
color: #FF0000;
font-weight: bold;
}
-->
</style></head>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#99CC00">
<form name="form1" id="form1" method="post" action="?action=bf">
<tr>
<td height="71" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td height="29" colspan="2" align="center" background="afterimage/line2.jpg" class="product_bt">::数据库备份::</td>
</tr>
<tr>
<td height="25" colspan="2" background="afterimage/titleline.gif"> </td>
</tr>
<tr>
<td width="18%" height="25" align="center" bgcolor="#F9F9F9"><span class="style1">数据路径:
</span></td>
<td width="82%" bgcolor="#F9F9F9"><input name="text1" type="text" id="text1" size="50" /> </td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#EEEEEE"><span class="style1"> 备份数据库路径:</span></td>
<td height="25" bgcolor="#EEEEEE"><input name="text2" type="text" id="text2" size="50" />
<input type="submit" name="Submit" value=" 备份数据库 " /></td>
</tr>
<tr>
<td height="25" colspan="2" align="center" bgcolor="#F3F3F3"><%
Function CopyFiles(TempSource,TempEnd)
Dim FSO
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(TempEnd) then
Response.Write "目标备份文件 <b>" & TempEnd & "</b> 已存在,请先删除!"
Set FSO=Nothing
Exit Function
End IF
IF FSO.FileExists(TempSource) Then
Else
Response.Write "要复制的源数据库文件 <b>"&TempSource&"</b> 不存在!"
Set FSO=Nothing
Exit Function
End If
FSO.CopyFile TempSource,TempEnd
Response.Write "已经成功复制文件 <b>"&TempSource&"</b> 到 <b>"&TempEnd&"</b>"
Set FSO = Nothing
End Function
if request("action")="bf" then
ff=server.MapPath(request("text1"))
aa=server.MapPath(request("text2"))
ss=split(request("text2"),"/")
CreateFolder(ss(0))
call CopyFiles(ff,aa)
end if
Sub CreateFolder(strFolder)
'首选判断要建立的文件夹是否已经存在
strTestFolder = Server.Mappath(strFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")
' 检查文件夹是否存在
If objFSO.FolderExists(strTestFolder) Then
response.write "该文件夹已经存在!"
Else
Dim strTestFolder, objFSO
strTestFolder = Server.Mappath(strFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")
' 建立文件夹
objFSO.CreateFolder(strTestFolder)
Set objFSO = Nothing
End If
End Sub
%></td>
</tr>
</table></td>
</tr></form>
</table>
</body>
</html>
我可是把整个代码都贴出来了
用着可好用 我正用的
有两个
一个简单的下面是代码
<form name="form1" method="post" action="?action=bf">
备份原数据库路径:
<input name="text1" type="text" id="text1">
<p>备份目标数据库路径:
<input name="text2" type="text" id="text2">
</p>
<p>
<label>
<input type="submit" name="Submit" value="备份">
</label>
</p>
</form>
<%
Function CopyFiles(TempSource,TempEnd)
Dim FSO
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(TempEnd) then
Response.Write "目标备份文件 <b>" & TempEnd & "</b> 已存在,请先删除!"
Set FSO=Nothing
Exit Function
End IF
IF FSO.FileExists(TempSource) Then
Else
Response.Write "要复制的源数据库文件 <b>"&TempSource&"</b> 不存在!"
Set FSO=Nothing
Exit Function
End If
FSO.CopyFile TempSource,TempEnd
Response.Write "已经成功复制文件 <b>"&TempSource&"</b> 到 <b>"&TempEnd&"</b>"
Set FSO = Nothing
End Function
if request("action")="bf" then
ff=server.MapPath(request("text1"))
aa=server.MapPath(request("text2"))
call CopyFiles(ff,aa)
end if
%>
**************************************我是分割线************************
还有复杂的
<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=gb2312" />
<title>数据库备份系统</title>
<style type="text/css">
<!--
body {
background-color: #F4FFD2;
margin-left:5px;
margin-top: 15px;
margin-right: 5px;
margin-bottom: 10px;
}
html{
font-size:12px;
scrollbar-face-color:#99cc66;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#F4FFD2;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-highlight-color:#fcfcfc;
scrollbar-shadow-color:#99cc00;
scrollbar-darkshadow-color:#99cc66;
}
input{background-color:#FFFFFF;
border-color:#333333;
border:1px;
font-style:normal;
}
.title {
FONT-SIZE: 18px; COLOR: #010000; FONT-FAMILY: "黑体"
}
A:hover {
COLOR: #f18b01; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
TD {
FONT-SIZE: 9pt; COLOR: #666666; WORD-BREAK: break-all; LINE-HEIGHT: 170%; TEXT-DECORATION: none
}
.白字 {
COLOR: #ffffff
}
.company {
FONT-SIZE: 12px; COLOR: #2b2b2b; LINE-HEIGHT: 22px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.dot {
FONT-SIZE: 12px; COLOR: #aeaeae; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.news {
FONT-SIZE: 12px; COLOR: #515151; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.word {
FONT-SIZE: 12px; COLOR: #6f6f6f; LINE-HEIGHT: 18px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.caption_dark {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.caption_simple {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.button {
FONT-SIZE: 12px; COLOR: #666666; TEXT-DECORATION: none
}
.date {
FONT-SIZE: 10px; COLOR: #acacac; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.doman {
FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #0a52af; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.form {
BORDER-RIGHT: #e0e0e0 1px solid; BORDER-TOP: #e0e0e0 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #e0e0e0 1px solid; COLOR: #333333; BORDER-BOTTOM: #e0e0e0 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #f7f7f7
}
.web_button {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #616e43; TEXT-DECORATION: none
}
.bbs_user {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ff6600; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.bbs_user_simple {
FONT-SIZE: 12px; COLOR: #575757; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.menu {
FONT-SIZE: 12px; COLOR: #e4e4e4; TEXT-DECORATION: none
}
.copright {
FONT-SIZE: 12px; COLOR: #333333; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.bt_word {
FONT-SIZE: 12px; COLOR: #333333; LINE-HEIGHT: 18px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.list {
FONT-SIZE: 12px; COLOR: #424242; FONT-FAMILY: "??"; TEXT-DECORATION: none
}
.list_class {
FONT-SIZE: 12px; COLOR: #808080; FONT-FAMILY: "???"; TEXT-DECORATION: none
}
.page {
FONT-SIZE: 12px; COLOR:#000000; TEXT-DECORATION: none
}
.bbs_bt {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #000000; TEXT-DECORATION: none
}
.bbs_bt_simple {
FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #545454; TEXT-DECORATION: none
}
.bbs_list_word {
FONT-SIZE: 12px; COLOR: #171717; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.case {
FONT-SIZE: 12px; COLOR: #5a5e61; LINE-HEIGHT: 18px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.date_simple {
FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.product_bt {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #333333; LINE-HEIGHT: 16px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.prodcut {
FONT-SIZE: 12px; COLOR: #505050; LINE-HEIGHT: 16px; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.form2 {
BORDER-RIGHT: #989898 1px solid; BORDER-TOP: #989898 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #989898 1px solid; COLOR: #333333; BORDER-BOTTOM: #989898 1px solid; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #f6f6f6
}
.button3 {
FONT-SIZE: 12px; COLOR: #7b7b7b; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.bt1 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #717171
}
.bt_line {
FONT-SIZE: 14px; COLOR: #547db2; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.bt2 {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ff9501; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
A.nav:link {
FONT-SIZE: 12px; COLOR: #ffffff; TEXT-DECORATION: none
}
A.nav:visited {
FONT-SIZE: 12px; COLOR: #ffffff; TEXT-DECORATION: none
}
A.nav:hover {
FONT-SIZE: 12px; COLOR: #ffff00; TEXT-DECORATION: none
}
<font face="Verdana, Arial, Helvetica, sans-serif">
.sb{color:#000000;font-size:13px;text-decoration:none}
a.sb:visited{color:#6699FF;font-size:13}
a.sb:link{color:#3399CC;font-size:13px}
.tomg { color: #666666; font-size:12px; text-decoration:none}
a.tomg:link {color: #666666; text-decoration:none}
a.tomg:visited {color: #666666; text-decoration:none}
a.tomg:hover { color:#FF3300; font-size:14px;text-decoration:none}
.00 { color:#333333; font-size:12px; text-decoration:none}
a.00:hover { color: #FF6666; text-decoration:underline}
a.00:link {color: #666666; text-decoration:none}
a.00:visited {color: #000000; text-decoration:none}
a.bb:link {color:#666666; text-decoration:none;cursor:hand;font-weight:bold}
a.bb:visited {color: #666666; text-decoration:none;cursor:hand;font-weight:bold}
a.bb:hover {color: #CC0000; text-decoration:underline;cursor:hand;font-weight:bold}
.cc{color:#FFFFFF;font-size:12px;text-decoration:none}
.tomg1 { color: #000000; font-size:12px;letter-spacing:1.5; word-spacing:1;line-height:2;text-decoration:none}
a.tomg1:link {color: #000000; text-decoration:none}
a.tomg1:visited {color: #000000; text-decoration:none}
a.tomg1:hover { color:#99CC33 ; text-decoration:none}
.style1 {color: #000000}
.style2 {
color: #FF0000;
font-weight: bold;
}
-->
</style></head>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#99CC00">
<form name="form1" id="form1" method="post" action="?action=bf">
<tr>
<td height="71" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td height="29" colspan="2" align="center" background="afterimage/line2.jpg" class="product_bt">::数据库备份::</td>
</tr>
<tr>
<td height="25" colspan="2" background="afterimage/titleline.gif"> </td>
</tr>
<tr>
<td width="18%" height="25" align="center" bgcolor="#F9F9F9"><span class="style1">数据路径:
</span></td>
<td width="82%" bgcolor="#F9F9F9"><input name="text1" type="text" id="text1" size="50" /> </td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#EEEEEE"><span class="style1"> 备份数据库路径:</span></td>
<td height="25" bgcolor="#EEEEEE"><input name="text2" type="text" id="text2" size="50" />
<input type="submit" name="Submit" value=" 备份数据库 " /></td>
</tr>
<tr>
<td height="25" colspan="2" align="center" bgcolor="#F3F3F3"><%
Function CopyFiles(TempSource,TempEnd)
Dim FSO
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(TempEnd) then
Response.Write "目标备份文件 <b>" & TempEnd & "</b> 已存在,请先删除!"
Set FSO=Nothing
Exit Function
End IF
IF FSO.FileExists(TempSource) Then
Else
Response.Write "要复制的源数据库文件 <b>"&TempSource&"</b> 不存在!"
Set FSO=Nothing
Exit Function
End If
FSO.CopyFile TempSource,TempEnd
Response.Write "已经成功复制文件 <b>"&TempSource&"</b> 到 <b>"&TempEnd&"</b>"
Set FSO = Nothing
End Function
if request("action")="bf" then
ff=server.MapPath(request("text1"))
aa=server.MapPath(request("text2"))
ss=split(request("text2"),"/")
CreateFolder(ss(0))
call CopyFiles(ff,aa)
end if
Sub CreateFolder(strFolder)
'首选判断要建立的文件夹是否已经存在
strTestFolder = Server.Mappath(strFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")
' 检查文件夹是否存在
If objFSO.FolderExists(strTestFolder) Then
response.write "该文件夹已经存在!"
Else
Dim strTestFolder, objFSO
strTestFolder = Server.Mappath(strFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")
' 建立文件夹
objFSO.CreateFolder(strTestFolder)
Set objFSO = Nothing
End If
End Sub
%></td>
</tr>
</table></td>
</tr></form>
</table>
</body>
</html>
壹寰(深圳)科技文化有限公司
2021-03-27 广告
2021-03-27 广告
不同公司提供的方案也不一样。以上回答如果还觉得不够详细,可以来咨询下壹寰(深圳)科技文化有限公司。91数据恢复是壹寰(深圳)科技文化有限公司旗下专业数据恢复品牌,91数据恢复专注于勒索病毒数据恢复、勒索病毒数据修复、数据库修复、数据库解密恢...
点击进入详情页
本回答由壹寰(深圳)科技文化有限公司提供
展开全部
主要看你是啥数据库了。
如果是ACCESS,可以直接复制到其他盘
如果是SQL SEVER,要进入企业管理器,然后对数据库点右键——所有任务——数据库备份,选择指定的路径进行备份
如果是ACCESS,可以直接复制到其他盘
如果是SQL SEVER,要进入企业管理器,然后对数据库点右键——所有任务——数据库备份,选择指定的路径进行备份
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询