Linux: Mount Box.com Account Locally to Server ( Command Line)

Cloud storage nowadays has create a trend on storing and accessing data from any where around the world. 2 most popular cloud storage providers are Dropbox and Box.net. In this post, I am going to show you on how to mount Box.net account inside the Linux box. You are required to have a Box.net account, which is free if you register for personal plan and it comes with 5 GB online storage space.
We will use davfs2 to mount Box.net account via WebDAV. Dropbox do not offer this feature at the moment. Variable that I used as follows:
OS: CentOS 6.2 64bit
Box.net username: pdelete@gmail.com
Box.net password: Password1234
Mount point: /mnt/box/
1. To use the simplest way on installation, we will use RPMforge repository:
$ cd /usr/local/src
$ rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
$ wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
$ rpm -K rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

2. Once done, lets install davfs2 via yum:
$ yum install -y davfs2
 Or download at:
 http://pkgs.repoforge.org/davfs2/

3. Create the mount point:
$ mkdir /mnt/box

4. Add following line to /etc/fstab:
https://dav.box.com/dav    /mnt/box    davfs    rw,user,noauto 0 0

5. Add Box.net account information into /etc/davfs2/secrets using text editor:
https://dav.box.com/dav  pdelete@gmail.com  Password1234
Notes: If you use special characters in your password use a forward slash in front of the special character (thanks to Keith for this highlight)
6. Change the lock mechanism of mounted filesystem. Open /etc/davfs2/davfs2.conf and find following value:
#use_locks    1




And change to:

use_locks     0

7. Mount the partition:
$ mount /mnt/box

Done! Now you can start to sync your files to your cloud storage by copying the files into /mnt/box directory. Login into Box.net account and verify that the files should be existed. Depending on the file size, you might need to wait for a while after copying process complete before it appears in the Box.net account.
Following screenshot is the Box.net account. I just sync my public_html backup files to the cloud storage.

Happy ‘clouding’. Cheers!

Nhận xét

Bài đăng phổ biến từ blog này

CLEANING UP THE ZABBIX DATABASE

Configuring DHCP Relay service on the FortiGate unit

[Resolved] Amazon EC2 Redhat 7 using 6GB for the root space