Sync the files between a source and target file sources. Scans both file sources to find all included files and compares the results to decide what actions must be taken to sync the target file source.
./ftp-sync [-t|--test] [--preserve-target] <CONFIG-PATH>- --preserve-target
- do not delete files from the target that are not present in the source
- -t, --test
- do not perform any actual syncing actions, just print the plan to STDOUT
{
"target": <FILE_SOURCE_DEFINITION>,
"source": <FILE_SOURCE_DEFINITION>
}
// FILE_SOURCE_DEFINITION
{
"type": "sftp" | "filesystem", // required
"root_directory": Path, // required
"excluded": string[], // optional
// sftp only
"ip": string, // required
"port": u16, // default, 22
"username": string, // required
"password": string // optional, will be prompted if not present
}