It is quite troublesome to back up the website database, but you still need to export it through ftp. so, how can this problem be solved?

Source: Internet
Author: User
It is quite troublesome to back up the website database and to export data through ftp, so I would like to ask who has done what program, who can export the data of the database of a website with one click, and make it into a compressed file, download ------ solution -------------------- under win & nbsp? & Nbsp; write a bat & nbsp; file by yourself. to process. & nbsp; backup & nbsp; compression & nbsp; copy files to the FTP directory ------ solution ----- it is quite troublesome to back up the website database and export the files through ftp, so please ask
Who has done what program, can export the database data of a website with one click, make it into a compressed file, download
------ Solution --------------------
Win? Write a bat file by yourself to process. back up and compress the copied file to the FTP directory.
------ Solution --------------------
:: ........................................................................................................................ ........................................................................................................................ .........
: Version: BACKDATESYSTEM V1.0
: Function: used to back up programs and data on the system platform
: Feature: generate a file name based on the current date
: Pathback, pathSource, pathdatabase, filename, password, and letter (next line)
: (Connected line) baklogPath, bakdatabase, bakdatatime, baktimeStart are (next line)
: Backup Path, source path, database path, backup file prefix name, and password (next line)
: (Connected) WinRAR installation drive letter, log path, database name, SQL automatic backup time, document time
: Bak_ftpServer, bak_ftpUserName, and bak_ftpUserPass are FTP addresses, users, and passwords.
:: ........................................................................................................................ ........................................................................................................................ .........
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 -- compress and generate %filename=%bakdate%%baktimestart%.rar ...... [% Date % time %]> baibaklogpath‑log_?bakdate=.txt

: Echo -- Start Upload ...... [% 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 folders 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 -- uploaded [% date % time %] --> % baklogpath1_log_1_bakdate1_.txt


Back up the bat at net before January 1, year 45. for details, refer!

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.