Publish: 2017-05-17 | Modify: 2017-05-17
Dropbox is a powerful synchronization drive and one of the few cloud storage services that supports WEBDAV. Linux systems can install davfs2 and mount Dropbox using webdav to easily access and backup files. If you haven't registered for Dropbox yet, you can visit www.dropbox.com to sign up (please use a VPN if necessary).
Installing davfs2 on CentOS is very simple, just execute the following command:
yum install davfs2 -y
This step was quite confusing and there wasn't any official documentation available. Some online sources mentioned that the webdav address is https://dav.dropdav.com/
and you just need to enter your username and password. However, this didn't work at all. The correct method is as follows:
After completing the previous steps, mounting Dropbox is straightforward. Just execute the following commands. You will be prompted to enter your dropdav account username and password.
# Create mount directory
mkdir /home/dropbox
# Execute mount command
mount -t davfs https://dav.dropdav.com/backup /home/dropbox
In the above command, https://dav.dropdav.com/backup
is the name of the folder you created in Dropbox. Please modify it according to your actual situation. If the mount is successful, you will see the following screenshot:
Afterwards, any files stored in /home/dropbox
will be automatically synchronized to Dropbox, achieving the purpose of backup. Here is a screenshot:
Due to the Great Firewall, Dropbox may not work properly or be slow on servers located in China. It is recommended to use servers located outside of China to mount Dropbox for data backup. Another cloud storage service that supports WEBDAV in China is Jiaonang Cloud, which can also be mounted using the same method.
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.