Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Automatically back up websites and databases, package and upload FTP servers and delete files in the first 30 days

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Automatic backup of websites and databases Package and upload FTP servers and delete files from the first 30 days

@echo offnul

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report