Using a remote server, FTP operations on another remote server are much faster than local machine operations.
Previously wrote an article about how FTP is manually remotely operated on Linux,
Today I found an automated batch script that feels good. Meet my needs.
My a site in Hong Kong my B server Linux in the country. This allows the a site to be automatically backed up to B server.
Hope this blog can give the students in need some help.
# # # # # # #从ftp服务器上的/home/data to the local/home/databackup####
#!/bin/bash ftp-n<<! Open 192.168.1.171user guest 123456 binary cd/home/data lcd/home/databackup prompt mget * Close bye!
2. FTP automatically log in to upload files.
# # # #本地的/home/data#### on/home/databackup to FTP server
Open 192.168.1.171
Hash
!
3. FTP automatic login to download a single file.
# # # #ftp服务器上下载/home/data/a.sh to local/home/databackup####
Open 192.168.1.171
!
4. FTP automatic login to upload a single file.
# # # #把本地/home/databachup/a.sh up Ftp/home/databackup # # # #
Open 192.168.1.171
!
Summary: Save the above script as a file added to the crontab to enable FTP to automatically upload, download files.
Starting at http://java-er.com-http://java-er.com/blog/linux-ftp-auto-backup/
See no regrets, eight tips for learning programming
30 Java face questions you will encounter
Tetris design principles
Android Tutorial two: Android Engineering file description Daquan
Java high-performance programming 26 considerations
A foreign net earns five blogging suggestions