Linux VPS通过安装CurlFtpFS来挂载FTP,可用来备份文件

1、安装CurlFtpFS

Debian/Ubuntu系统

apt-get install curlftpfs -y

2、挂载FTP

创建目录,路径及名称自己定

mkdir /home/ftp

挂载FTP

curlftpfs ftp.yourserver.com /home/ftp -o user=username:password

ftp.yourserver.com #FTP地址
/home/ftp #本地目录
username #FTP用户名
password #FTP密码

输入df -h命令查看下是否挂载成功。
最后可以将文件上传至本地文件夹/home/ftp进行备份了。

如果在挂载的时候出现如下错误:
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the ‘nonempty’ mount option
最简单的解决方法就是让挂载的本地目录变成空文件夹即可。

评论

此博客中的热门博文

FreeBSD安装Pure-FTPd及user manager for PureFTPd

debian lighttpd php ssl

解决nginx出现File not found的问题