Linux – Mounting a file system over the internet

filesystemsinternetlinuxnfs

I built a web application that runs on a virtual server for one of my customers. It includes the facility for them to upload files, but they now want to store those files on a server in their office.

The easiest way to do this would be to mount their file system over the internet directly onto the virtual server. I have experience of mounting NFS over an internal network, but I am not clear if it would work in this scenario.

Any thoughts? I can always write new software to transfer the files, but this would be an easy fix!

Note: The server in the office is Ubuntu 12 server running on a virtual server in a windows hyper-v environment. The VPS with the web app is Ubuntu 11.04

Best Answer

No one has mentioned sshfs yet. If you're on a modern linux distro and have ssh access to the remote host, it's as simple as:

sshfs user@hostname:/remote/directory /local/directory

Performance is quite acceptable (but not nearly as fast as a streamed sync like rsync if you require the whole directory).