# Read files from two servers

**URL:** <https://www.ruby-forum.com/t/read-files-from-two-servers/151055>\
**Category:** Rails\
**Created:** [October 16, 2008, 11:50am UTC](https://www.ruby-forum.com/t/read-files-from-two-servers/151055 "2008-10-16T11:50:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnAnAn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/97f17d/32.png) [@AnAnAn](https://www.ruby-forum.com/u/AnAnAn)\
**Post date:** [October 16, 2008, 11:50am UTC](https://www.ruby-forum.com/t/read-files-from-two-servers/151055/1 "2008-10-16T11:50:56Z")

</div>

Hi,  
in production I have 2 debian servers to which my app is deployed:  
the first has a public IP and serves as webserver and the second has a  
private IP and is used for database and other scripts running.

The scripts that are running saves some files on the second server  
that should be accessed from the first server.  
Is there an easy way to mount/link (?) the directories I need to be  
accessed from both servers?

Thanks,  
Andrea

---

<div class="post-metadata">

**Author:** ![AnAnAn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/97f17d/32.png) [@AnAnAn](https://www.ruby-forum.com/u/AnAnAn)\
**Post date:** [October 16, 2008, 1:04pm UTC](https://www.ruby-forum.com/t/read-files-from-two-servers/151055/2 "2008-10-16T13:04:07Z")

</div>

An wrote:

> Hi,  
> in production I have 2 debian servers to which my app is deployed:  
> the first has a public IP and serves as webserver and the second has a  
> private IP and is used for database and other scripts running.
> 
> The scripts that are running saves some files on the second server  
> that should be accessed from the first server.  
> Is there an easy way to mount/link (?) the directories I need to be  
> accessed from both servers?
> 
> Thanks,  
> Andrea  
> mount that second server directory into you web server machine (in  
> public)  
> use “sshfs” tool for file mounting , it is very fast

sshfs removed\_email\_address@domain.invalid:/remote/directory  
/local/machine/remote\_directory/

---

<div class="post-metadata">

**Author:** ![AnAnAn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/97f17d/32.png) [@AnAnAn](https://www.ruby-forum.com/u/AnAnAn)\
**Post date:** [October 16, 2008, 2:16pm UTC](https://www.ruby-forum.com/t/read-files-from-two-servers/151055/3 "2008-10-16T14:16:57Z")

</div>

That is what I was looking for!

Thank you very much!

Andrea

On 16 Ott, 13:04, Sniper A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
