Now that my servers and I live in completely different houses, I can’t use Samba to make working on my websites easy (at least, not without opening a big can of wriggly security worms). Using an FTP client to upload files every time I change them is a huge pain in the ass, and it makes me feel like it’s 1996 again, so I whipped up something to do the work for me.
LazyFTP is a PHP script that keeps remote files in sync with local files via FTP. It does this by monitoring the local directory tree for additions, changes, and deletions, and uploading or deleting files on the FTP server when necessary. It runs from the command line on any operating system that PHP supports (Windows, Linux, FreeBSD, MacOS X, etc.).
Enjoy.
Update: I’ve renamed the script from Filemon to LazyFTP, since it turns out there’s already a widely-used Linux tool named Filemon (although it does something completely different).
Comments
Rsync?
I've never actually set it up myself, so I could be wrong.
As an alternative, it's not hard to set up port-forwarding with SSH. It's sort of a poor man's VPN. It should let you continue to use Samba without opening up any ports beyond 22. Of course, you have to deal with the odd, non-transparent nature of SSH port forwards if you go that way. It might end up being easier to set up a real VPN.
Of course, you could also SSH in to your webserver and edit live files with vi, which is what I tend to do :)
Re: Rsync?
Also, I imagine there's some added overhead with rsync because a process has to be started each time you want to sync on both the client and the server. With FTP, I can just open a connection and leave it open as long as I need it. rsync's more efficient bandwidth usage might negate this benefit, however.
Re: Rsync?
now make a forum that has no images and all text, similvar to vB/phpbb but not as bloated.
Re: Rsync?
i will pay $30. enough said.
Name?
Cuz inquiring minds want to know.
Re: Name?
Uh, it's short for "file monitor". :P
Re: Name?
I choose you, Filemon!
Best quote.
For some reason, that quote tickeled me. I wish I had said it.
Name change
LazyFTP is a much cooler name.
unison
Could you use unison?
Re: unison
Unison does look useful. Thanks.