Last update at :2024-05-02,Edit by888u
We all know that the hard drive provided by vps is usually relatively small. Sometimes we often back up certain folders in the vps. After the backup time is long, the hard drive is not enough. At this time, we can only choose manual or automatic Delete old backup files. Sometimes I think that the space of a virtual host is usually relatively large and the price is low. It would be great if I could buy a cheap virtual host and use the space inside for backup.
However, it really works.
We can link the virtual host space with the VPS by mounting FTP and use it freely within the VPS. And, it's pretty simple.
The method of ubabntu is as follows, and the method of centos7 is as follows:
Install curlftpfs
apt-get install curlftpfs
Create ftp directory
mkdir /home/ftp
Mount using curlftpfs command
curlftpfs -o codepage=utf8 ftp://username:password@127.0.0.1 /home/ftp
codepage: Coding method, usually utf8, you can also use gb2312
username: FTP username
password: FTP password
127.0.0.1: FTP address
/home/ftp: The path to mount to, which is the directory you just created in vps
It should be noted that if your FTP username contains special characters such as [@], please use [%40] instead of [@].
After the mounting is completed, as long as we enter the /home/ftp directory, we can see the files of our virtual host. At this time, any file we put into the /home/ftp directory will be considered. The file was transferred to our FTP space.
Uninstall the mount
fusermount -u /home/ftp
or
umount /home/ftp
Automatically mount at boot
However, after the mounting is completed, the mounting point will disappear every time we restart the system, because this requires us to join the automatic mounting at boot. Just run the following command. Remember to replace the data inside.
echo "curlftpfs -o codepage=utf8 ftp://username:password@127.0.0.1 /home/ftp" >> /etc/fstab
centos7 method:
need some time
Finally, let me advertise my own website:
If you like shopping on Taobao, you can go to the following website to find Taobao’s internal coupons, allowing you to shop on Taobao at lower prices: www.runcpp.com
Oh, by the way, I am the webmaster of that website, not the blogger.
Recommended site search: Hong Kong server rental 99idc, website space registration-free, domain name registration number query, free permanent virtual host, registration-free, Foshan high-defense server, Hong Kong cloud host, cc domain name, Hong Kong cloud host, Hong Kong ip proxy,
发表评论