Struggling to back up the site database is quite troublesome, but also to go to FTP export, so ask

Source: Internet
Author: User
Who has done what program, you can export a Web site database data,, get compressed files, download


Reply to discussion (solution)

What about win? Write a bat file yourself. To deal with it. Backup compressed copy files to FTP directory

How to write???

::.........................................................................................................................................................................................................................................................
:: Version: Backdatesystem V1.0
:: function: For system platform Backup program and data
:: Features: Generate file names by current date
:: Pathback, Pathsource, pathdatabase, filename, password, letter (next down)
:: (Uplink) Baklogpath, Bakdatabase, Bakdatatime, Baktimestart respectively (next)
:: (uplink) backup path, source path, database path, backup file prefix name, password (downstream)
:: (uplink) WinRAR installation drive letter, log path, database name, SQL automatic backup time, document time
:: Bak_ftpserver, Bak_ftpusername, Bak_ftpuserpass for FTP address, user and password
::.........................................................................................................................................................................................................................................................
Set Pathback=f:\websiteback\
Set Pathsource=e:\website\gjwebsite
:: Set pathdatabase=e:\project\website_aspnet\aspnet_test008\db_2005
Set Filename=andy_website_
Set Password=wuyi
Set Letter=d:
Set baklogpath=f:\websiteback\log\
Set baktimestart=%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,2%
Set bakdate=%date:~0,4%%date:~5,2%%date:~8,2%
:: Set Bakdatabase=dg_gongjiao
:: Set bakdatatime=1126

:: FTP Related parameters

:: Set bak_ftpserver=200.0.0.0
:: Set Bak_ftpusername=test
:: Set bak_ftpuserpass=test123456

:: Del%pathback%%filename%*.rar

%letter%\progra~1\winrar\winrar.exe a-inul-p%password%%pathback%%filename%%bakdate%%baktimestart%%pathSource%

echo-compression complete, generate%filename%%bakdate%%baktimestart%.rar ... [%date%%time%] >%baklogpath%log_%bakdate%.txt

:: Echo--Start uploading ... [%date%%time%] >>%baklogpath%log_%bakdate%.txt

:: Echo Open%bak_ftpserver% >ftp.andy
:: Echo%bak_ftpusername%>>ftp.andy
:: Echo%bak_ftpuserpass%>>ftp.andy
:: Echo Bin >>ftp.andy

:: Whether to create a folder in days
:: Echo mkdir%bakdate% >>ftp.andy
:: Echo CD%bakdate% >>ftp.andy

:: Echo mput%pathback%%filename%*.rar >>ftp.andy
:: Echo Bye >>ftp.andy


:: Ftp-s:ftp.andy-i >>%baklogpath%log_%bakdate%.txt
:: Del ftp.andy/q
:: REM Xcopy%bak_tmpfile%*%pathback%%filename%/y
:: Del%pathback%%filename%*.rar/q/S
:: Rd%pathback%/Q

:: Echo--Upload complete [%date%%time%]-->>%baklogpath%log_%bakdate%.txt


Four or five years ago when you backed up net bat, reference!

So esoteric. Can it be too superficial ...

Not done, FTP is not bring your own download it? Why not?

  • 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.