Free and open source solution based on git:
Use git-ftp for synchronization. After installation and setting up a local git repository you can do:
- git ftp init -u < user> -P ftp://host.example.com/public_html #for pushing the first time
- git ftp push --user < user> --passwd < password> ftp://host.example.com/public_html
Now you just need to watch for filesystem changes, add them to your local git repository and push your repository using the above command.
Advantages:
- git-ftp works on windows and linux (tested with mysys git on windows)
- integrates nicely into your development setup if you're already using git
- very easy to setup and use (if you're familiar with git)
- incremental changes -> saves a lot of bandwidth
Disadvantages:
- you need to find a solution to watch for filesystem changes (shouldn't be too hard to do, e.g. nodejs has solutions for this)
Here's an example for a batch file i'm using on windows:
@echo off
git init .
git add . --all
git commit -am "auto commit"
set /p pwd= Please enter ftp password:
git ftp push --user myftpuser --passwd %pwd% ftp://myftphost.com/myfolder
Note that this is an interactive example, but you could make it noninteractive by storing the password in the batch file.