<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ubuntu,debian,redhat -linuxany.com &#187; ftp</title>
	<atom:link href="http://www.linuxany.com/archives/tag/ftp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description>ubuntu,debian,redhat,fedora,centos</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:01:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Aria2 &#8211; Debian命令行下高速的下载工具</title>
		<link>http://www.linuxany.com/archives/408.html</link>
		<comments>http://www.linuxany.com/archives/408.html#comments</comments>
		<pubDate>Fri, 29 Aug 2008 15:24:44 +0000</pubDate>
		<dc:creator>x72</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[aria2]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.linuxlaptop.cn/?p=440</guid>
		<description><![CDATA[aria2 is a utility for downloading files. The supported protocols are HTTP(S), FTP, BitTorrent (DHT, PEX, MSE/PE), and Metalink. It can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth.
It even supports downloading a file from HTTP(S)/FTP and BitTorrent at the same time, while the data downloaded from HTTP(S)/FTP is [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/408.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ftp自动备份-自动删除远程备份文件的shell</title>
		<link>http://www.linuxany.com/archives/261.html</link>
		<comments>http://www.linuxany.com/archives/261.html#comments</comments>
		<pubDate>Tue, 25 Mar 2008 12:19:05 +0000</pubDate>
		<dc:creator>x72</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[ftp]]></category>

		<guid isPermaLink="false">http://www.linuxlaptop.cn/?p=268</guid>
		<description><![CDATA[*********************
功能：
下载服务器ftp目录中的所有文件，
下载完后立即删除服务器ftp目录中的所有文件
*********************
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
环境：
俩台机器都是centos4.5_x86

****************
1.ftp服务器主机信息
ftp服务器主机名server
vftp服务端:vsftp-2.0.1-5.EL4.5
vftp服务器ftp目录默认是系统用户所在目录
这里的用户为ftptest，家目录为/home/ftptest
        IP:192.168.1.159
        ftp目录：/home/ftptest
        ftp用户：ftptest
        ftptest用户密码：123456
****************
2.ftp客户端主机信息
ftp服务器主机名client
ftp客户端:lftp-3.0.6-3
        IP:192.168.1.153
        存放目录：/home/xiutuo/ftp
        即从服务器下载的文件存放到/home/xiutuo/ftp
****************
3.脚本名：lftp_bak.sh
存放在client中的/etc/目录下
该脚本属xiutuo及其属组xiutuo
# cd /etc/
# chown xiutuo:xiutuo lftp_bak.sh
你可以根据自己需要设置计划任务
让该脚本自动在某时执行
****************
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
为了测试方便，
请在vftp服务端IP:192.168.159机器上安装vsftp的rpm包
在ftp客户端IP:192.168.1.153机器上安装lftp的rpm包
++++++++++++++++++++++++++++++++++++++++
 
 
在client主机上
# vi /etc/lftp_bak.sh
增加如下内容
#!/bin/bash
#指定ftp服务器的ip
serverip=192.168.1.159
#指定ftp服务器的ftp用户
serveruser=ftptest
#指定ftp服务器的ftp用户密码
serverpass=123456
#指定client主机本地下载文件存放的目录
localdir=/home/xiutuo/ftp
#指定server主机的ftp目录
#remotedir=./
#指定server主机的主机名
host=`hostname`
#切换到本地下载文件存放的目录
cd $localdir
#输入开始备份的信息
echo &#8220;Starting FTP Backup on &#8221; $host
#连接ftp服务器
/usr/bin/ftp -in &#60;&#60;EOF
open $serverip
user $serveruser $serverpass
#切换到server主机的ftp目录
#cd $remotedir
bin
#列出ftp服务器ftp目录中文件列表并存放到client中的$localdir中
ls . mulu.txt
verbose
#下载ftp服务器ftp目录中的所有文件
mget *.* .
#打印ftp状态
stat
#退出ftp服务器
bye
EOF
echo &#8220;get the directory list ok,and get all the files once ok&#8221;
echo &#8220;begin to delte the file in the mulu.txt&#8221;
#取出client主机$localdir中的mulu.txt中的文件名
#并逐一删除在mulu.txt的文件
list=`cat mulu.txt &#124; awk &#8216;{print [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/261.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTP Batch Scripts</title>
		<link>http://www.linuxany.com/archives/202.html</link>
		<comments>http://www.linuxany.com/archives/202.html#comments</comments>
		<pubDate>Sun, 03 Feb 2008 17:05:31 +0000</pubDate>
		<dc:creator>x72</dc:creator>
				<category><![CDATA[1.Application]]></category>
		<category><![CDATA[ftp]]></category>

		<guid isPermaLink="false">http://www.linuxplay.cn/index.php/archives/203</guid>
		<description><![CDATA[幾乎所有 OS 都有內建文字模式的 FTP Client, 這種小巧的 FTP Client 配合批次指令, 可一次處理多個 FTP 命令, 配合系統排程亦可達成自動化傳輸功能. 操作方法如下: 
《Windows》
Command:
ftp -n -s:scriptfile.scr
Script file contents:
open ftp.site.addr
user
guest (account)
guest (password)
put file1
quit

《Linux &#8211; ftp》
Script file contents:
#!/bin/sh
ftp -n ftp.site.addr &#60;&#60; EOF
user guest guest (account password)
prompt
verbose
put file1
quit
EOF

《Linux &#8211; lftp》
Command:
lftp -f scriptfile.scr
Script file contents:
open ftp.site.addr
user guest guest (account password)
put file1
quit
Rate limit:
open /etc/lftp.conf, adding:
set net:limit-rate 10240 (bytes per [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/202.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to backup MySQL databases, web server files to a FTP server automatically with Shell Script</title>
		<link>http://www.linuxany.com/archives/74.html</link>
		<comments>http://www.linuxany.com/archives/74.html#comments</comments>
		<pubDate>Sat, 15 Dec 2007 15:00:06 +0000</pubDate>
		<dc:creator>x72</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[3.Database]]></category>
		<category><![CDATA[ftp]]></category>

		<guid isPermaLink="false">http://www.linuxplay.cn/?p=69</guid>
		<description><![CDATA[Part I :System + Web + MySQL backup script  
This is a simple backup solution for people who run their own web server and MySQL server on a dedicated box or VPS. Most dedicated hosting provider provides the backup service using NAS or FTP servers. These service providers will hook you to their redundant centralized storage [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/74.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
