Box.com (formerly known as box.net) is an online file sharing and Cloud content management service for enterprise companies. With a recent promotion you could get as much as 50GB of storage space and what better thing to do then to mount it on your vps and use it for backup storage?
NB!
A comment was made by a reader that Box changed the URL to https://dav.box.com/dav
If you follow this guide, make sure you use the correct URL.
This example will use davfs to connect to box.com.
Install it by issuing this command:
1 2 3 |
apt-get install davfs2 |
Now, create the directory where we will mount your account to
1 2 3 |
mkdir /box-storage |
Add this line to your /etc/fstab:
1 2 3 |
https://www.box.com/dav /box-storage davfs rw,user,noauto 0 0 |
Add this line to the bottom of the /etc/davfs2/secrets file
make sure you use the email address and password that you signed up with
1 2 3 |
https://www.box.com/dav your@email.here password |
Edit the /etc/davfs2/davfs2.conf
Find this line:
1 2 3 |
# use_locks 1 |
And change it to this:
1 2 3 |
use_locks 0 |
Now we can mount it. To do that, use the following command:
1 2 3 |
mount /box-storage |
Show that it’s there with with
1 2 3 |
df -h |
On a side-note, my empty account did show that I already used 50% of the storage, which wasn’t true.
Now you can rsync/copy/move something to the directory, remember that the maximum filesize for personal accounts are 250mb.
Lastly:
[alert style=”green”]Make sure that your VPS Provider has enabled Fuse for your vps.
Remember to mount the directory after a reboot if you need access to it again.[/alert]
This doesn’t work with OpenVZ, correct? Since custom kernel modules are not allowed?
It does work with OpenVZ, you need to have your provider to enable FUSE.
Tried this, but my VPS provider does currently not provide the “fuse” kernel module.
@James Williams: Are you shure that there is not even a theoretical possibility to do this? Came around this: http://linuxworldweb.blogspot.de/2012/02/enable-fuse-on-vps-openvz.html
P.S.: So, what I was thinking about: I can extend the disk space on absolutly lowend VPS and be might be able to synchronize some files between them? Really nice!
Excellent. I asked my provider to enable, and all is running well (though I do get a fuse error citing modprobe, but I think that is an OpenVZ issue). Thanks so much!
You can always ask your provider to enable Fuse.
Finally my provider enabled FUSE and it works like a charm!
Thanks for this great hint. 🙂
It seems Box changed the url for dav access so you might want to update your guide from https://www.box.com/dav to https://dav.box.com/dav