Use ftp to batch process backup files

Source: Internet
Author: User

The names of backup files are generally regular (for example, name + Date and Time. Bak). We can use Windows batch processing to automatically perform remote backup of the system.

 

The procedure is as follows:

1. Create a batch processing file with the following Bak. Bat content

Echo open XXX. XXX> E: \ todo.txt
Echo username> E: \ todo.txt
Echo password> E: \ todo.txt
Echo bin> E: \ todo.txt
Echo put E: \ Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2% pai.bak>> todo.txt
Echo bye> todo.txt

FTP-S: e: \ todo.txt (use the ftp-s command to read the FTP batch processing command from the todo.txt file for execution );

Del E: \ todo.txt (delete the todo.txt file so that it can be regenerated next time );

Echo % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 0000 backupok! > Log.txt (write the result to log.txt );

 

2. Use scheduled tasks to regularly execute the Bak. BAT file.


Use ftp to batch process backup files

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.