2021-05-16 18:39:33 +02:00
|
|
|
package bisync
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strconv"
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
func makeHelp(help string) string {
|
|
|
|
replacer := strings.NewReplacer(
|
|
|
|
"|", "`",
|
|
|
|
"{MAXDELETE}", strconv.Itoa(DefaultMaxDelete),
|
|
|
|
"{CHECKFILE}", DefaultCheckFilename,
|
|
|
|
"{WORKDIR}", DefaultWorkdir,
|
|
|
|
)
|
|
|
|
return replacer.Replace(help)
|
|
|
|
}
|
|
|
|
|
2022-08-14 04:56:32 +02:00
|
|
|
var shortHelp = `Perform bidirectional synchronization between two paths.`
|
2021-05-16 18:39:33 +02:00
|
|
|
|
2021-05-16 19:26:43 +02:00
|
|
|
var rcHelp = makeHelp(`This takes the following parameters
|
|
|
|
|
|
|
|
- path1 - a remote directory string e.g. |drive:path1|
|
|
|
|
- path2 - a remote directory string e.g. |drive:path2|
|
|
|
|
- dryRun - dry-run mode
|
|
|
|
- resync - performs the resync run
|
|
|
|
- checkAccess - abort if {CHECKFILE} files are not found on both filesystems
|
|
|
|
- checkFilename - file name for checkAccess (default: {CHECKFILE})
|
|
|
|
- maxDelete - abort sync if percentage of deleted files is above
|
|
|
|
this threshold (default: {MAXDELETE})
|
2023-08-25 09:14:37 +02:00
|
|
|
- force - Bypass maxDelete safety check and run the sync
|
2021-05-16 19:26:43 +02:00
|
|
|
- checkSync - |true| by default, |false| disables comparison of final listings,
|
|
|
|
|only| will skip sync, only compare listings from the last run
|
2023-08-25 09:14:37 +02:00
|
|
|
- createEmptySrcDirs - Sync creation and deletion of empty directories.
|
|
|
|
(Not compatible with --remove-empty-dirs)
|
2021-05-16 19:26:43 +02:00
|
|
|
- removeEmptyDirs - remove empty directories at the final cleanup step
|
|
|
|
- filtersFile - read filtering patterns from a file
|
2023-08-25 09:14:37 +02:00
|
|
|
- ignoreListingChecksum - Do not use checksums for listings
|
|
|
|
- resilient - Allow future runs to retry after certain less-serious errors, instead of requiring resync.
|
|
|
|
Use at your own risk!
|
2021-05-16 19:26:43 +02:00
|
|
|
- workdir - server directory for history files (default: {WORKDIR})
|
|
|
|
- noCleanup - retain working files
|
|
|
|
|
|
|
|
See [bisync command help](https://rclone.org/commands/rclone_bisync/)
|
|
|
|
and [full bisync description](https://rclone.org/bisync/)
|
|
|
|
for more information.`)
|
2021-05-16 18:39:33 +02:00
|
|
|
|
|
|
|
var longHelp = shortHelp + makeHelp(`
|
2021-05-16 19:26:43 +02:00
|
|
|
|
|
|
|
[Bisync](https://rclone.org/bisync/) provides a
|
|
|
|
bidirectional cloud sync solution in rclone.
|
|
|
|
It retains the Path1 and Path2 filesystem listings from the prior run.
|
|
|
|
On each successive run it will:
|
|
|
|
- list files on Path1 and Path2, and check for changes on each side.
|
|
|
|
Changes include |New|, |Newer|, |Older|, and |Deleted| files.
|
|
|
|
- Propagate changes on Path1 to Path2, and vice-versa.
|
|
|
|
|
|
|
|
See [full bisync description](https://rclone.org/bisync/) for details.
|
2021-05-16 18:39:33 +02:00
|
|
|
`)
|