Synchronize directory contents
A set of scripts for backing up directories, including all subdirectories.
They are scripted and compiled in PHP or JavaScript, and are thus widely portable.
These scripts can be used to update a delayed website, for direct updates, use PHP FTP Synchronizer instead.
Synchronize two local directories
The script compares the two directories and their subdirectories. If the folder does not exist in the destination directory, it will be copied. Similarly, if the sizes are different, otherwise the contents of the files are compared and if they are different, a copy is performed.
Empty folders are created in the destination directory.
Syntax:
solp synchro [- v | - d] source cible
If Script is not available on the operating system, use PHP script directly:
php synchro.php source cible
Parameters and parameters:
- - d: Display only, operations are shown, but nothing really changes.
- v: Verbose. Show commands and run them.
source: copy directory.
Purpose: Backup.
Using with Node.js
You can also compile the script in JavaScript:
solj synchro source cible
And execute it directly from Node.js:
node synchro.js source cible
Delayed Web Sync
This script is intended for those who build a delayed website and send files by ftp to the server.
To do this, you need to have a picture and backup, plus another folder that contains only files for download. The image and backup are compared, the backup is updated and the differences are stored in an additional folder, after which you download this folder.
The syntax is that of a synchronous script, plus an additional parameter for an additional folder.
Syntax:
solp dsync [- v | - d | -u] répsource répcible répftp
or:
php dsync.php répsource répcible répftp
Additional options and options:
repftp: directory with subdirectories where the download folders are stored.
-u to update (optional update). Typically, the storage directory is erased so as not to load what was already there. This setting is not erased if the download has not been completed since the last synchronization.
Downloads
All PHP or JS scripts and executable sources are included.
- Synchronicity for Script 2. The Script source can be compiled with the latest versions of the Script-PHP compiler or Script-JavaScript. To run the JavaScript version, you must install Node.js.
- Synchronously. For "Scriptol 2001."