We are running e-commerce sites, all with the help of a professional operation platform to do. Such as a domain name host with the virtual host management software, now most of the popularity of virtual host management software is based on ASP + SQL Server. The site file section designed, and are generally not going to change him, the most important parts of the database, laptop battery, almost all the time active. Such as the registration of new users, users to buy products, financial transaction records, answer records, etc..Imagine if one day this operator server’s hard disk suddenly broken, even if we automatically each day on this server backup, data, or will be lost. So this vital data, must be taken the way of off-site backup, then how can we automatically database off-site backup to another server?
1, first of all, we in the platform server must set up an automatic backup.A1185 If we use is a SQL Server database maintenance plan to manipulate MySQL should also have the appropriate program or software.Not repeat them here, this article introduces the automatic offsite backup, local backup must do.
2, followed by the FTP software installed, you can use A1175 IIS comes, also be used like Serv-U FTP software. Then set up an FTP user name and password, and point to the database backup directory.
3, in the backup database, the establishment of a bat batch file as follows:
“D: \ wget.exe”-x-c-T 5-w 0-N-r-l inf-nH-ftp-user = mybackup-ftp-password = mybackup-PE: \ BackUp \ “ftp:// 1.1.1.1 /
Which wget.exe this file is similar to the wget command under Linux, Laptop battery Windows also have the appropriate program, the Internet can be downloaded. For instance, we put it on the D drive, the path is D: \ wget.exe, the mybackup is the FTP user name password, E: \ Backup \ backup server backup storage path, and finally the master server IP or domain name.
4, this bat file is added to the backup server scheduled task, let him run periodically. A very important database can be executed once a day once or twice, observe the results of the implementation to ensure that the fully automated. The wget various parameters:
* Start
-V,-version display the version of wget exit
-h,-help print syntax help
-b-background after startup into the background
the-e-execute the COMMAND to run `. wgetrc ‘format command, wgetrc format see / etc / wgetrc or ~ /. wgetrc
* records and input file
-o,-output-file = FILE record is written to the FILE file
-a-the append-output = the FILE record is appended to the FILE file
– d, -debug print debug output
-q, – quiet quiet mode (no output)
-v verbose-verbose mode (default setting)
-nv, – non-verbose turn off verbose mode, but not quiet mode
-i, – input-file = FILE download FILE file URLs,
-F,-force-html input file as HTML-formatted file to be treated
-B, – base = URL the URL as a parameter to specify the-F-i file appears relative links prefix
-sslcertfile = of the FILE optional client certificate the
-sslcertkey = KEYFILE optional client certificate KEYFILE
-EGD-file = FILE specify the file name of the EGD is the socket
* Download
-bind-address = the ADDRESS specified local use address ( The host name or IP, when the local multiple IP or name)
-t, – tries = NUMBER set maximum try to link a number (0 for unlimited)
-O-output-document = FILE write documents to FILE file in
-nc, – no-clobber do not overwrite existing files or use the # prefix
-c-the continue then download not downloaded file
-progress = the TYPE setting process tag
-N, – timestamping do not do not re-download the files unless more than local file
-S-server-response print server response
– spider do not download anything
-T, – timeout = SECONDS set the response timeout seconds
-w, – wait = SECONDS two attempts and interval between SECONDSs
waitretry-= re-link between SECONDS wait 1 … SECONDS seconds
– random-wait wait for the download between 0 … 2 * WAIT seconds,
-Y, – proxy = on / off, open or close the proxy
-Q, – quota = NUMBER set download capacity limit
– limit-rate = RATE limit download lost in
* directory
-nd-no-directories do not create a directory
-x, – force-directories force to create the directory
-nH and-no-host-directories do not create host directories
-P -directory-prefix = PREFIX will save the file to the directory the PREFIX / …
– cut-dirs = NUMBER ignore NUMBER layer remote directory
* HTTP option
-http-user = USER set the HTTP user name is the USER
-http-passwd = the PASS set http password to PASS
– C,-the cache = on / off to allow / not allow server-side data cache (under normal circumstances allow)
– E-html-extension All text / html documents to html extension to save
-ignore-length ignore `Content-Length ‘header field
-header = STRING insert headers in the
user agent string STRING - proxy-user = USER set called the USER
-a proxy-passwd = the PASS set the proxy password is PASS
-the referer = URL in the HTTP request contains `the Referer: URL ‘head
-s,-save-headers save the HTTP header to the file
-U, – user-agent = AGENT set the agent’s name as AGENT instead of Wget / VERSION
– cookie – no-http-keep-alive to close the HTTP active link (Permanent link).
cookies = off do not use cookies
- load-cookies = FILE before starting the session from the file FILE load
the save-cookies = FILE in the end of the session The cookies will be saved to FILE file
* FTP option
-nr-dont-remove-listing is not removed. `listing ‘file
-g,-the glob = on / off, open or close the file name globbing mechanism
-passive-ftp use passive transfer mode (default)
-active-ftp use the active transfer mode
-retr-the symlinks in recursive time, the links point to files (not directories)
* recursive download
-r,-the recursive recursive download – with caution !
-l, – level = NUMBER maximum recursion depth (inf or 0 for infinite).
-delete-after delete the file now after local
-k-convert-links convert the non-relative links as relative links
-K, – backup- converted before converting file X, the backup X.orig
-m-mirror is equivalent to-r-the N-l inf-nr.
-p, – page-requisites to download all the pictures of the display HTML files
* Recursive contains does not contain (accept / reject)
-A, – accept = LIST semicolon separated accept the extension of the list
-R,-reject = LIST semicolon separated list of extensions will not be accepted
-D, – domains = the LIST semicolon-separated list of accepted domains
-the exclude-domains = LIST separated by semicolons are not accepted domain list
– follow-ftp tracking FTP links in HTML documents
– follow-tags = LIST separated by semicolons a list of HTML tags to be tracked
-G, – ignore-tags = LIST semicolon-separated list of ignored HTML tags
-H-span-the hosts when recursive to the external host
-L-the relative only to track the relative link
-I-include-directories = LIST list to allow directory
-X,-the exclude-directories = LIST not be contain a list of directory
-np, – no-parent do not be traced back to parent directory
Recent Comments