您好,登录后才能下订单哦!
自动备份网站和数据库打包并上传FTP服务器并删除前30天文件
@echo off<nul 3>nul
Set nowdate=%date:~0,10%
set nowdate=%nowdate:/=%
Md d:\autobak\"%nowdate:/=-%"\www
Md d:\autobak\"%nowdate:/=-%"\data
forfiles /p d:\autobak /d -30 /c "cmd /c del /f /q /a @path && rd /s /q @path"
xcopy d:\www d:\autobak\"%nowdate:/=-%"\www
xcopy d:\data d:\autobak\"%nowdate:/=-%"\data
cd c:\Program Files\WinRAR\
winrar.exe a -r d:\autobak\"%nowdate:/=-%".zip d:\autobak\"%nowdate:/=-%"\
Echo open 61.136.208.30 >ftp.up
Echo user >>ftp.up
Echo password >>ftp.up
Echo cd neibu-www\ >>ftp.up
Echo lcd D:\autobak>>ftp.up
Echo put "%nowdate:/=-%".zip >>ftp.up
Echo bye>>ftp.up
FTP -s:ftp.up
del ftp.up /q
pause & exit
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。