On one server [s1] I for a page I create and resize one image into a 300×300 in one folder and [a thumbnail] 130×130 in a subfolder. s1 is a lamp server. I have another server [s2] running the same OS [fedora 15] serving static files [images, css, js] only, via nginx.
Is it possible to copy the images to s2 after they are created [resized, etc] from s1.?
This only happens maybe 10-20 times a day but needs to be immediate [if possible].
I’ve read about using php & sftp but I have been unable to make sense of it.
I guess my question, more to the point, is; Can anyone recommend a method that is reliable.?
Seems like you are in need of rsync.
You can execute that command any way you want.
Have a look at few examples. http://www.thegeekstuff.com/2010/09/rsync-command-examples/ (not my blog )