Synchronization provides you a set of scripts for making a backup of the content of a directory, including all sub-directories. They are written in Scriptol and compiled in PHP and thus are widely portable.
This script may be used to update a website in different modes.
The script compares two directories with their sub-directories. If the file doesn't exist in the target directory, it is copied. And also if the sizes differ, else the contents of the files are compared and if they differ, the copy is performed. Empty folders are created in the target directory.
This script is intended to those who build a website offline and send the files by FTP on the server. To do that, you must have an image and a backup of the site, plus another folder that holds only the files to upload.
The image and the backup are compared, the backup is updated and the differences are stored into the extra folder, then you have to upload the files in this folder. The syntax is that of the synchro script, plus an extra parameter for the additional folder.