mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 23:22:08 +01:00
bisync: add --resync-mode for customizing --resync - fixes #5681
Before this change, the path1 version of a file always prevailed during --resync, and many users requested options to automatically select the winner based on characteristics such as newer, older, larger, and smaller. This change adds support for such options. Note that ideally this feature would have been implemented by allowing the existing `--resync` flag to optionally accept string values such as `--resync newer`. However, this would have been a breaking change, as the existing flag is a `bool` and it does not seem to be possible to have a `string` flag that accepts both `--resync newer` and `--resync` (with no argument.) (`NoOptDefVal` does not work for this, as it would force an `=` like `--resync=newer`.) So instead, the best compromise to avoid a breaking change was to add a new `--resync-mode CHOICE` flag that implies `--resync`, while maintaining the existing behavior of `--resync` (which implies `--resync-mode path1`. i.e. both flags are now valid, and either can be used without the other. --resync-mode CHOICE In the event that a file differs on both sides during a `--resync`, `--resync-mode` controls which version will overwrite the other. The supported options are similar to `--conflict-resolve`. For all of the following options, the version that is kept is referred to as the "winner", and the version that is overwritten (deleted) is referred to as the "loser". The options are named after the "winner": - `path1` - (the default) - the version from Path1 is unconditionally considered the winner (regardless of `modtime` and `size`, if any). This can be useful if one side is more trusted or up-to-date than the other, at the time of the `--resync`. - `path2` - same as `path1`, except the path2 version is considered the winner. - `newer` - the newer file (by `modtime`) is considered the winner, regardless of which side it came from. This may result in having a mix of some winners from Path1, and some winners from Path2. (The implementation is analagous to running `rclone copy --update` in both directions.) - `older` - same as `newer`, except the older file is considered the winner, and the newer file is considered the loser. - `larger` - the larger file (by `size`) is considered the winner (regardless of `modtime`, if any). This can be a useful option for remotes without `modtime` support, or with the kinds of files (such as logs) that tend to grow but not shrink, over time. - `smaller` - the smaller file (by `size`) is considered the winner (regardless of `modtime`, if any). For all of the above options, note the following: - If either of the underlying remotes lacks support for the chosen method, it will be ignored and will fall back to the default of `path1`. (For example, if `--resync-mode newer` is set, but one of the paths uses a remote that doesn't support `modtime`.) - If a winner can't be determined because the chosen method's attribute is missing or equal, it will be ignored, and bisync will instead try to determine whether the files differ by looking at the other `--compare` methods in effect. (For example, if `--resync-mode newer` is set, but the Path1 and Path2 modtimes are identical, bisync will compare the sizes.) If bisync concludes that they differ, preference is given to whichever is the "source" at that moment. (In practice, this gives a slight advantage to Path2, as the 2to1 copy comes before the 1to2 copy.) If the files _do not_ differ, nothing is copied (as both sides are already correct). - These options apply only to files that exist on both sides (with the same name and relative path). Files that exist *only* on one side and not the other are *always* copied to the other, during `--resync` (this is one of the main differences between resync and non-resync runs.). - `--conflict-resolve`, `--conflict-loser`, and `--conflict-suffix` do not apply during `--resync`, and unlike these flags, nothing is renamed during `--resync`. When a file differs on both sides during `--resync`, one version always overwrites the other (much like in `rclone copy`.) (Consider using `--backup-dir` to retain a backup of the losing version.) - Unlike for `--conflict-resolve`, `--resync-mode none` is not a valid option (or rather, it will be interpreted as "no resync", unless `--resync` has also been specified, in which case it will be ignored.) - Winners and losers are decided at the individual file-level only (there is not currently an option to pick an entire winning directory atomically, although the `path1` and `path2` options typically produce a similar result.) - To maintain backward-compatibility, the `--resync` flag implies `--resync-mode path1` unless a different `--resync-mode` is explicitly specified. Similarly, all `--resync-mode` options (except `none`) imply `--resync`, so it is not necessary to use both the `--resync` and `--resync-mode` flags simultaneously -- either one is sufficient without the other.
This commit is contained in:
parent
8d3bcc025a
commit
810644e873
@ -205,6 +205,7 @@ func TestBisync(t *testing.T) {
|
||||
ci.RefreshTimes = true
|
||||
}
|
||||
bisync.Colors = true
|
||||
time.Local, _ = time.LoadLocation("America/New_York")
|
||||
|
||||
baseDir, err := os.Getwd()
|
||||
require.NoError(t, err, "get current directory")
|
||||
@ -865,6 +866,8 @@ func (b *bisyncTest) runBisync(ctx context.Context, args []string) (err error) {
|
||||
_ = opt.ConflictLoser.Set(val)
|
||||
case "conflict-suffix":
|
||||
opt.ConflictSuffixFlag = val
|
||||
case "resync-mode":
|
||||
_ = opt.ResyncMode.Set(val)
|
||||
default:
|
||||
return fmt.Errorf("invalid bisync option %q", arg)
|
||||
}
|
||||
|
@ -208,7 +208,14 @@ func (b *bisyncRun) EqualFn(ctx context.Context) context.Context {
|
||||
fs.Debugf(src, "equal skipped")
|
||||
}
|
||||
ctxNoLogger := operations.WithLogger(ctx, noop)
|
||||
if operations.Equal(ctxNoLogger, src, dst) {
|
||||
|
||||
timeSizeEqualFn := func() (equal bool, skipHash bool) { return operations.Equal(ctxNoLogger, src, dst), false } // normally use Equal()
|
||||
if b.opt.ResyncMode == PreferOlder || b.opt.ResyncMode == PreferLarger || b.opt.ResyncMode == PreferSmaller {
|
||||
timeSizeEqualFn = func() (equal bool, skipHash bool) { return b.resyncTimeSizeEqual(ctxNoLogger, src, dst) } // but override for --resync-mode older, larger, smaller
|
||||
}
|
||||
skipHash := false // (note that we might skip it anyway based on compare/ht settings)
|
||||
equal, skipHash = timeSizeEqualFn()
|
||||
if equal && !skipHash {
|
||||
whichHashType := func(f fs.Info) hash.Type {
|
||||
ht := getHashType(f.Name())
|
||||
if ht == hash.None && b.opt.Compare.SlowHashSyncOnly && !b.opt.Resync {
|
||||
@ -233,3 +240,32 @@ func (b *bisyncRun) EqualFn(ctx context.Context) context.Context {
|
||||
}
|
||||
return operations.WithEqualFn(ctx, equalFn)
|
||||
}
|
||||
|
||||
func (b *bisyncRun) resyncTimeSizeEqual(ctxNoLogger context.Context, src fs.ObjectInfo, dst fs.Object) (equal bool, skipHash bool) {
|
||||
switch b.opt.ResyncMode {
|
||||
case PreferLarger, PreferSmaller:
|
||||
// note that arg order is path1, path2, regardless of src/dst
|
||||
path1, path2 := b.resyncWhichIsWhich(src, dst)
|
||||
if sizeDiffers(path1.Size(), path2.Size()) {
|
||||
winningPath := b.resolveLargerSmaller(path1.Size(), path2.Size(), path1.Remote(), path2.Remote(), b.opt.ResyncMode)
|
||||
// don't need to check/update modtime here, as sizes definitely differ and something will be transferred
|
||||
return b.resyncWinningPathToEqual(winningPath), b.resyncWinningPathToEqual(winningPath) // skip hash check if true
|
||||
}
|
||||
// sizes equal or don't know, so continue to checking time/hash, if applicable
|
||||
return operations.Equal(ctxNoLogger, src, dst), false // note we're back to src/dst, not path1/path2
|
||||
case PreferOlder:
|
||||
// note that arg order is path1, path2, regardless of src/dst
|
||||
path1, path2 := b.resyncWhichIsWhich(src, dst)
|
||||
if timeDiffers(ctxNoLogger, path1.ModTime(ctxNoLogger), path2.ModTime(ctxNoLogger), path1.Fs(), path2.Fs()) {
|
||||
winningPath := b.resolveNewerOlder(path1.ModTime(ctxNoLogger), path2.ModTime(ctxNoLogger), path1.Remote(), path2.Remote(), b.opt.ResyncMode)
|
||||
// if src is winner, proceed with equal to check size/hash and possibly just update dest modtime instead of transferring
|
||||
if !b.resyncWinningPathToEqual(winningPath) {
|
||||
return operations.Equal(ctxNoLogger, src, dst), false // note we're back to src/dst, not path1/path2
|
||||
}
|
||||
// if dst is winner (and definitely unequal), do not proceed further as we want dst to overwrite src regardless of size difference, and we do not want dest modtime updated
|
||||
return true, true
|
||||
}
|
||||
// times equal or don't know, so continue to checking size/hash, if applicable
|
||||
}
|
||||
return operations.Equal(ctxNoLogger, src, dst), false // note we're back to src/dst, not path1/path2
|
||||
}
|
||||
|
@ -30,7 +30,8 @@ type TestFunc func()
|
||||
|
||||
// Options keep bisync options
|
||||
type Options struct {
|
||||
Resync bool
|
||||
Resync bool // whether or not this is a resync
|
||||
ResyncMode Prefer // which mode to use for resync
|
||||
CheckAccess bool
|
||||
CheckFilename string
|
||||
CheckSync CheckSyncMode
|
||||
@ -123,7 +124,8 @@ func init() {
|
||||
cmdFlags := commandDefinition.Flags()
|
||||
// when adding new flags, remember to also update the rc params:
|
||||
// cmd/bisync/rc.go cmd/bisync/help.go (not docs/content/rc.md)
|
||||
flags.BoolVarP(cmdFlags, &Opt.Resync, "resync", "1", Opt.Resync, "Performs the resync run. Path1 files may overwrite Path2 versions. Consider using --verbose or --dry-run first.", "")
|
||||
flags.BoolVarP(cmdFlags, &Opt.Resync, "resync", "1", Opt.Resync, "Performs the resync run. Equivalent to --resync-mode path1. Consider using --verbose or --dry-run first.", "")
|
||||
flags.FVarP(cmdFlags, &Opt.ResyncMode, "resync-mode", "", "During resync, prefer the version that is: path1, path2, newer, older, larger, smaller (default: path1 if --resync, otherwise none for no resync.)", "")
|
||||
flags.BoolVarP(cmdFlags, &Opt.CheckAccess, "check-access", "", Opt.CheckAccess, makeHelp("Ensure expected {CHECKFILE} files are found on both Path1 and Path2 filesystems, else abort."), "")
|
||||
flags.StringVarP(cmdFlags, &Opt.CheckFilename, "check-filename", "", Opt.CheckFilename, makeHelp("Filename for --check-access (default: {CHECKFILE})"), "")
|
||||
flags.BoolVarP(cmdFlags, &Opt.Force, "force", "", Opt.Force, "Bypass --max-delete safety check and run the sync. Consider using with --verbose", "")
|
||||
@ -149,6 +151,8 @@ func init() {
|
||||
flags.FVarP(cmdFlags, &Opt.ConflictResolve, "conflict-resolve", "", "Automatically resolve conflicts by preferring the version that is: "+ConflictResolveList+" (default: none)", "")
|
||||
flags.FVarP(cmdFlags, &Opt.ConflictLoser, "conflict-loser", "", "Action to take on the loser of a sync conflict (when there is a winner) or on both files (when there is no winner): "+ConflictLoserList+" (default: num)", "")
|
||||
flags.StringVarP(cmdFlags, &Opt.ConflictSuffixFlag, "conflict-suffix", "", Opt.ConflictSuffixFlag, "Suffix to use when renaming a --conflict-loser. Can be either one string or two comma-separated strings to assign different suffixes to Path1/Path2. (default: 'conflict')", "")
|
||||
_ = cmdFlags.MarkHidden("debugname")
|
||||
_ = cmdFlags.MarkHidden("localtime")
|
||||
}
|
||||
|
||||
// bisync command definition
|
||||
|
@ -50,6 +50,7 @@ type bisyncRun struct {
|
||||
DebugName string
|
||||
lockFile string
|
||||
renames renames
|
||||
resyncIs1to2 bool
|
||||
}
|
||||
|
||||
type queues struct {
|
||||
@ -89,6 +90,9 @@ func Bisync(ctx context.Context, fs1, fs2 fs.Fs, optArg *Options) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
b.setResyncDefaults()
|
||||
|
||||
err = b.setResolveDefaults(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -202,6 +202,11 @@ func (b *bisyncRun) preCopy(ctx context.Context) context.Context {
|
||||
// otherwise impossible in Sync, so override Equal
|
||||
ctx = b.EqualFn(ctx)
|
||||
}
|
||||
if b.opt.ResyncMode == PreferOlder || b.opt.ResyncMode == PreferLarger || b.opt.ResyncMode == PreferSmaller {
|
||||
overridingEqual = true
|
||||
fs.Debugf(nil, "overriding equal")
|
||||
ctx = b.EqualFn(ctx)
|
||||
}
|
||||
ctxCopyLogger := operations.WithSyncLogger(ctx, logger)
|
||||
if b.opt.Compare.Checksum && (b.opt.Compare.NoSlowHash || b.opt.Compare.SlowHashSyncOnly) && b.opt.Compare.SlowHashDetected {
|
||||
// set here in case !b.opt.Compare.Modtime
|
||||
|
@ -44,7 +44,7 @@ func (preferChoices) Choices() []string {
|
||||
}
|
||||
|
||||
func (preferChoices) Type() string {
|
||||
return "Prefer"
|
||||
return "string"
|
||||
}
|
||||
|
||||
// ConflictResolveList is a list of --conflict-resolve flag choices used in the help
|
||||
@ -373,21 +373,22 @@ func (b *bisyncRun) conflictWinner(ds1, ds2 *deltaSet, remote1, remote2 string)
|
||||
case PreferPath2:
|
||||
return 2
|
||||
case PreferNewer, PreferOlder:
|
||||
return b.resolveNewerOlder(ds1, ds2, remote1, remote2, b.opt.ConflictResolve)
|
||||
t1, t2 := ds1.time[remote1], ds2.time[remote2]
|
||||
return b.resolveNewerOlder(t1, t2, remote1, remote2, b.opt.ConflictResolve)
|
||||
case PreferLarger, PreferSmaller:
|
||||
return b.resolveLargerSmaller(ds1, ds2, remote1, remote2, b.opt.ConflictResolve)
|
||||
s1, s2 := ds1.size[remote1], ds2.size[remote2]
|
||||
return b.resolveLargerSmaller(s1, s2, remote1, remote2, b.opt.ConflictResolve)
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
// returns the winning path number, or 0 if winner can't be determined
|
||||
func (b *bisyncRun) resolveNewerOlder(ds1, ds2 *deltaSet, remote1, remote2 string, prefer Prefer) int {
|
||||
func (b *bisyncRun) resolveNewerOlder(t1, t2 time.Time, remote1, remote2 string, prefer Prefer) int {
|
||||
if fs.GetModifyWindow(b.octx, b.fs1, b.fs2) == fs.ModTimeNotSupported {
|
||||
fs.Infof(remote1, "Winner cannot be determined as at least one path lacks modtime support.")
|
||||
return 0
|
||||
}
|
||||
t1, t2 := ds1.time[remote1], ds2.time[remote2]
|
||||
if t1.IsZero() || t2.IsZero() {
|
||||
fs.Infof(remote1, "Winner cannot be determined as at least one modtime is missing. Path1: %v, Path2: %v", t1, t2)
|
||||
return 0
|
||||
@ -418,8 +419,7 @@ func (b *bisyncRun) resolveNewerOlder(ds1, ds2 *deltaSet, remote1, remote2 strin
|
||||
}
|
||||
|
||||
// returns the winning path number, or 0 if winner can't be determined
|
||||
func (b *bisyncRun) resolveLargerSmaller(ds1, ds2 *deltaSet, remote1, remote2 string, prefer Prefer) int {
|
||||
s1, s2 := ds1.size[remote1], ds2.size[remote2]
|
||||
func (b *bisyncRun) resolveLargerSmaller(s1, s2 int64, remote1, remote2 string, prefer Prefer) int {
|
||||
if s1 < 0 || s2 < 0 {
|
||||
fs.Infof(remote1, "Winner cannot be determined as at least one size is unknown. Path1: %v, Path2: %v", s1, s2)
|
||||
return 0
|
||||
|
@ -8,13 +8,41 @@ import (
|
||||
"github.com/rclone/rclone/cmd/bisync/bilib"
|
||||
"github.com/rclone/rclone/fs"
|
||||
"github.com/rclone/rclone/fs/filter"
|
||||
"github.com/rclone/rclone/lib/terminal"
|
||||
)
|
||||
|
||||
// for backward compatibility, --resync is now equivalent to --resync-mode path1
|
||||
// and either flag is sufficient without the other.
|
||||
func (b *bisyncRun) setResyncDefaults() {
|
||||
if b.opt.Resync && b.opt.ResyncMode == PreferNone {
|
||||
fs.Debugf(nil, Color(terminal.Dim, "defaulting to --resync-mode path1 as --resync is set"))
|
||||
b.opt.ResyncMode = PreferPath1
|
||||
}
|
||||
if b.opt.ResyncMode != PreferNone {
|
||||
b.opt.Resync = true
|
||||
Opt.Resync = true // shouldn't be using this one, but set to be safe
|
||||
}
|
||||
|
||||
// checks and warnings
|
||||
if (b.opt.ResyncMode == PreferNewer || b.opt.ResyncMode == PreferOlder) && (b.fs1.Precision() == fs.ModTimeNotSupported || b.fs2.Precision() == fs.ModTimeNotSupported) {
|
||||
fs.Logf(nil, Color(terminal.YellowFg, "WARNING: ignoring --resync-mode %s as at least one remote does not support modtimes."), b.opt.ResyncMode.String())
|
||||
b.opt.ResyncMode = PreferPath1
|
||||
} else if (b.opt.ResyncMode == PreferNewer || b.opt.ResyncMode == PreferOlder) && !b.opt.Compare.Modtime {
|
||||
fs.Logf(nil, Color(terminal.YellowFg, "WARNING: ignoring --resync-mode %s as --compare does not include modtime."), b.opt.ResyncMode.String())
|
||||
b.opt.ResyncMode = PreferPath1
|
||||
}
|
||||
if (b.opt.ResyncMode == PreferLarger || b.opt.ResyncMode == PreferSmaller) && !b.opt.Compare.Size {
|
||||
fs.Logf(nil, Color(terminal.YellowFg, "WARNING: ignoring --resync-mode %s as --compare does not include size."), b.opt.ResyncMode.String())
|
||||
b.opt.ResyncMode = PreferPath1
|
||||
}
|
||||
}
|
||||
|
||||
// resync implements the --resync mode.
|
||||
// It will generate path1 and path2 listings
|
||||
// and copy any unique path2 files to path1.
|
||||
// It will generate path1 and path2 listings,
|
||||
// copy any unique files to the opposite path,
|
||||
// and resolve any differing files according to the --resync-mode.
|
||||
func (b *bisyncRun) resync(octx, fctx context.Context) error {
|
||||
fs.Infof(nil, "Copying unique Path2 files to Path1")
|
||||
fs.Infof(nil, "Copying Path2 files to Path1")
|
||||
|
||||
// Save blank filelists (will be filled from sync results)
|
||||
var ls1 = newFileList()
|
||||
@ -74,15 +102,15 @@ func (b *bisyncRun) resync(octx, fctx context.Context) error {
|
||||
var results1to2 []Results
|
||||
queues := queues{}
|
||||
|
||||
b.indent("Path2", "Path1", "Resync is copying UNIQUE files to")
|
||||
b.indent("Path2", "Path1", "Resync is copying files to")
|
||||
ctxRun := b.opt.setDryRun(fctx)
|
||||
// fctx has our extra filters added!
|
||||
ctxSync, filterSync := filter.AddConfig(ctxRun)
|
||||
if filterSync.Opt.MinSize == -1 {
|
||||
fs.Debugf(nil, "filterSync.Opt.MinSize: %v", filterSync.Opt.MinSize)
|
||||
}
|
||||
ci := fs.GetConfig(ctxSync)
|
||||
ci.IgnoreExisting = true
|
||||
b.resyncIs1to2 = false
|
||||
ctxSync = b.setResyncConfig(ctxSync)
|
||||
ctxSync = b.setBackupDir(ctxSync, 1)
|
||||
// 2 to 1
|
||||
if results2to1, err = b.resyncDir(ctxSync, b.fs2, b.fs1); err != nil {
|
||||
@ -90,8 +118,9 @@ func (b *bisyncRun) resync(octx, fctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
b.indent("Path1", "Path2", "Resync is copying UNIQUE OR DIFFERING files to")
|
||||
ci.IgnoreExisting = false
|
||||
b.indent("Path1", "Path2", "Resync is copying files to")
|
||||
b.resyncIs1to2 = true
|
||||
ctxSync = b.setResyncConfig(ctxSync)
|
||||
ctxSync = b.setBackupDir(ctxSync, 2)
|
||||
// 1 to 2
|
||||
if results1to2, err = b.resyncDir(ctxSync, b.fs1, b.fs2); err != nil {
|
||||
@ -130,9 +159,68 @@ func (b *bisyncRun) resync(octx, fctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if b.opt.CheckSync == CheckSyncTrue && !b.opt.DryRun {
|
||||
path1 := bilib.FsPath(b.fs1)
|
||||
path2 := bilib.FsPath(b.fs2)
|
||||
fs.Infof(nil, "Validating listings for Path1 %s vs Path2 %s", quotePath(path1), quotePath(path2))
|
||||
if err := b.checkSync(b.listing1, b.listing2); err != nil {
|
||||
b.critical = true
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if !b.opt.NoCleanup {
|
||||
_ = os.Remove(b.newListing1)
|
||||
_ = os.Remove(b.newListing2)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
--resync-mode implementation:
|
||||
PreferPath1: set ci.IgnoreExisting true, then false
|
||||
PreferPath2: set ci.IgnoreExisting false, then true
|
||||
PreferNewer: set ci.UpdateOlder in both directions
|
||||
PreferOlder: override EqualFn to implement custom logic
|
||||
PreferLarger: override EqualFn to implement custom logic
|
||||
PreferSmaller: override EqualFn to implement custom logic
|
||||
*/
|
||||
func (b *bisyncRun) setResyncConfig(ctx context.Context) context.Context {
|
||||
ci := fs.GetConfig(ctx)
|
||||
switch b.opt.ResyncMode {
|
||||
case PreferPath1:
|
||||
if !b.resyncIs1to2 { // 2to1 (remember 2to1 is first)
|
||||
ci.IgnoreExisting = true
|
||||
} else { // 1to2
|
||||
ci.IgnoreExisting = false
|
||||
}
|
||||
case PreferPath2:
|
||||
if !b.resyncIs1to2 { // 2to1 (remember 2to1 is first)
|
||||
ci.IgnoreExisting = false
|
||||
} else { // 1to2
|
||||
ci.IgnoreExisting = true
|
||||
}
|
||||
case PreferNewer:
|
||||
ci.UpdateOlder = true
|
||||
}
|
||||
// for older, larger, and smaller, we return it unchanged and handle it later
|
||||
return ctx
|
||||
}
|
||||
|
||||
func (b *bisyncRun) resyncWhichIsWhich(src, dst fs.ObjectInfo) (path1, path2 fs.ObjectInfo) {
|
||||
if b.resyncIs1to2 {
|
||||
return src, dst
|
||||
}
|
||||
return dst, src
|
||||
}
|
||||
|
||||
// equal in this context really means "don't transfer", so we should
|
||||
// return true if the files are actually equal or if dest is winner,
|
||||
// false if src is winner
|
||||
// When can't determine, we end up running the normal Equal() to tie-break (due to our differ functions).
|
||||
func (b *bisyncRun) resyncWinningPathToEqual(winningPath int) bool {
|
||||
if b.resyncIs1to2 {
|
||||
return winningPath != 1
|
||||
}
|
||||
return winningPath != 2
|
||||
}
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest change timestamp on all files except RCLONE_TEST[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest make modifications on both paths[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest place newer files on both paths[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest make modifications on both paths[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest 1. see that check-access passes with the initial setup[0m
|
||||
@ -84,10 +85,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(13) :[0m [34mtest 4. run sync with check-access. should pass.[0m
|
||||
@ -176,10 +178,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(24) :[0m [34mtest 8. run sync with --check-access. should pass.[0m
|
||||
|
@ -19,10 +19,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Using filters file {workdir/}exclude-other-filtersfile.txt
|
||||
INFO : Storing filters file hash to {workdir/}exclude-other-filtersfile.txt.md5
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(06) :[0m [34mtest EXCLUDE - test filters for check access[0m
|
||||
@ -133,10 +134,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Using filters file {workdir/}include-other-filtersfile.txt
|
||||
INFO : Storing filters file hash to {workdir/}include-other-filtersfile.txt.md5
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(29) :[0m [34mtest INCLUDE - test include/exclude filters for check access[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest 1. see that check-access passes with the initial setup[0m
|
||||
@ -85,12 +86,13 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : Checking access health
|
||||
INFO : Found 2 matching ".chk_file" files on both paths
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(14) :[0m [34mtest 4. run sync with check-access. should pass.[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest 1. run check-sync-only on a clean sync[0m
|
||||
@ -99,10 +100,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(20) :[0m [34mtest 7. run normal sync with check-sync enabled (default)[0m
|
||||
|
@ -13,10 +13,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": true
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest make modifications on both paths[0m
|
||||
|
@ -21,10 +21,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(11) :[0m [34mtest 1. Create an empty dir on Path1 by creating subdir/placeholder.txt and then deleting the placeholder[0m
|
||||
@ -144,10 +145,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(40) :[0m [34mlist-dirs {path1/}[0m
|
||||
subdir/ - filename hash: 86ae37b338459868804e9697025ba4c2
|
||||
|
13
cmd/bisync/testdata/test_dry_run/golden/test.log
vendored
13
cmd/bisync/testdata/test_dry_run/golden/test.log
vendored
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest new on path2 - file10[0m
|
||||
@ -65,12 +66,12 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
NOTICE: file10.txt: Skipped copy as --dry-run is set (size 19)
|
||||
NOTICE: file4.txt: Skipped copy as --dry-run is set (size 0)
|
||||
NOTICE: file6.txt: Skipped copy as --dry-run is set (size 19)
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
NOTICE: file1.txt: Skipped copy as --dry-run is set (size 0)
|
||||
NOTICE: file11.txt: Skipped copy as --dry-run is set (size 19)
|
||||
NOTICE: file2.txt: Skipped copy as --dry-run is set (size 13)
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
|
@ -25,10 +25,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}測試_Русский_ _ _ě_áñ/" with Path2 "{path2/}測試_Русский_ _ _ě_áñ/"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}測試_Русский_ _ _ě_áñ/" vs Path2 "{path2/}測試_Русский_ _ _ě_áñ/"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(14) :[0m [34mcopy-listings resync[0m
|
||||
|
||||
@ -81,10 +82,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(24) :[0m [34mdelete-file {path1/}測試_Русский_{spc}_{spc}_ě_áñ/測試_check{spc}file[0m
|
||||
[36m(25) :[0m [34mbisync check-access check-filename=測試_check{spc}file[0m
|
||||
@ -125,10 +127,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(29) :[0m [34mbisync check-access check-filename=測試_check{spc}file[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
@ -169,10 +172,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Using filters file {workdir/}測試_filtersfile.txt
|
||||
INFO : Storing filters file hash to {workdir/}測試_filtersfile.txt.md5
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(34) :[0m [34mcopy-as {datadir/}file1.txt {path1/} fileZ.txt[0m
|
||||
[36m(35) :[0m [34mbisync filters-file={workdir/}測試_filtersfile.txt[0m
|
||||
|
@ -23,10 +23,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(12) :[0m [34mtest place a newer files on both paths[0m
|
||||
|
@ -18,10 +18,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Using filters file {workdir/}filtersfile.flt
|
||||
INFO : Storing filters file hash to {workdir/}filtersfile.flt.md5
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(05) :[0m [34mcopy-listings resync[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest 1. inject filters file in workdir.[0m
|
||||
@ -78,10 +79,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Using filters file {workdir/}filtersfile.txt
|
||||
INFO : Storing filters file hash to {workdir/}filtersfile.txt.md5
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(12) :[0m [34mtest 5. run with filters-file alone. should run.[0m
|
||||
@ -142,9 +144,9 @@ INFO : Bisyncing with Comparison Settings:
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Using filters file {workdir/}filtersfile.txt
|
||||
INFO : Skipped storing filters file hash to {workdir/}filtersfile.txt.md5 as --dry-run is set
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(04) :[0m [34mbisync resync ignore-listing-checksum[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
@ -30,10 +31,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(05) :[0m [34mtest place newer files on both paths[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest delete >50% of local files[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest delete >50% of remote files[0m
|
||||
|
@ -15,10 +15,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
|
||||
@ -93,10 +94,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
|
||||
@ -166,10 +168,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(29) :[0m [34mtest changed on one path[0m
|
||||
|
@ -13,10 +13,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": true
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest place newer files on both paths[0m
|
||||
@ -104,10 +105,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(19) :[0m [34mcopy-file {datadir/}file1.txt {path1/}[0m
|
||||
@ -154,10 +156,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": true
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(25) :[0m [34mcopy-as {datadir/}file21.txt {path2/} file2.txt[0m
|
||||
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
@ -282,8 +283,8 @@ INFO : Path2: 2 changes: [32m 1 new[0m, [33m 1 modified[0m, [31m
|
||||
INFO : ([33mModified[0m: [36m 1 newer[0m, [34m 0 older[0m, [36m 1 larger[0m, [34m 0 smaller[0m)
|
||||
INFO : Applying changes
|
||||
INFO : Checking potential conflicts...
|
||||
ERROR : file1.txt: md5 differ
|
||||
ERROR : file2.txt: md5 differ
|
||||
ERROR : file1.txt: md5 differ
|
||||
NOTICE: {path2String}: 2 differences found
|
||||
NOTICE: {path2String}: 2 errors while checking
|
||||
INFO : Finished checking the potential conflicts. 2 differences found
|
||||
|
21
cmd/bisync/testdata/test_resync/golden/test.log
vendored
21
cmd/bisync/testdata/test_resync/golden/test.log
vendored
@ -15,10 +15,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(05) :[0m [34mmove-listings empty-path1[0m
|
||||
|
||||
@ -36,10 +37,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(09) :[0m [34mmove-listings empty-path2[0m
|
||||
|
||||
@ -83,10 +85,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
[36m(31) :[0m [34mcopy-listings mixed-diffs[0m
|
||||
|
||||
|
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path1.lst
vendored
Normal file
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path1.lst
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 42 - - 2022-02-22T00:00:00.000000000+0000 "file1.txt"
|
||||
- 33 - - 2022-02-22T00:00:00.000000000+0000 "file2.txt"
|
1
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path1.lst-new
vendored
Normal file
1
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path1.lst-new
vendored
Normal file
@ -0,0 +1 @@
|
||||
# bisync listing v1 from test
|
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path1.lst-old
vendored
Normal file
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path1.lst-old
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 33 - - 2006-03-04T00:00:00.000000000+0000 "file1.txt"
|
||||
- 42 - - 2005-01-02T00:00:00.000000000+0000 "file2.txt"
|
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path2.lst
vendored
Normal file
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path2.lst
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 42 - - 2022-02-22T00:00:00.000000000+0000 "file1.txt"
|
||||
- 33 - - 2022-02-22T00:00:00.000000000+0000 "file2.txt"
|
1
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path2.lst-new
vendored
Normal file
1
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path2.lst-new
vendored
Normal file
@ -0,0 +1 @@
|
||||
# bisync listing v1 from test
|
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path2.lst-old
vendored
Normal file
4
cmd/bisync/testdata/test_resync_modes/golden/_testdir_path1.._testdir_path2.path2.lst-old
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 - - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 33 - - 2006-03-04T00:00:00.000000000+0000 "file1.txt"
|
||||
- 42 - - 2005-01-02T00:00:00.000000000+0000 "file2.txt"
|
192
cmd/bisync/testdata/test_resync_modes/golden/test.log
vendored
Normal file
192
cmd/bisync/testdata/test_resync_modes/golden/test.log
vendored
Normal file
@ -0,0 +1,192 @@
|
||||
[36m(01) :[0m [34mtest resync-mode[0m
|
||||
|
||||
|
||||
[36m(02) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
[36m(03) :[0m [34mtouch-glob 2001-01-02 {datadir/} file1R.txt[0m
|
||||
[36m(04) :[0m [34mcopy-as {datadir/}file1R.txt {path2/} file1.txt[0m
|
||||
[36m(05) :[0m [34mtouch-glob 2001-03-04 {datadir/} file1L.txt[0m
|
||||
[36m(06) :[0m [34mcopy-as {datadir/}file1L.txt {path1/} file1.txt[0m
|
||||
|
||||
[36m(07) :[0m [34mtest bisync run with --resync-mode=newer[0m
|
||||
[36m(08) :[0m [34mbisync resync resync-mode=newer[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
{
|
||||
"Modtime": true,
|
||||
"Size": true,
|
||||
"Checksum": false,
|
||||
"NoSlowHash": false,
|
||||
"SlowHashSyncOnly": false,
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(09) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
[36m(10) :[0m [34mtouch-glob 2001-07-23 {datadir/} file1R.txt[0m
|
||||
[36m(11) :[0m [34mcopy-as {datadir/}file1R.txt {path2/} file1.txt[0m
|
||||
[36m(12) :[0m [34mtouch-glob 2001-08-26 {datadir/} file1L.txt[0m
|
||||
[36m(13) :[0m [34mcopy-as {datadir/}file1L.txt {path1/} file1.txt[0m
|
||||
|
||||
[36m(14) :[0m [34mtest bisync run with --resync-mode=path2[0m
|
||||
[36m(15) :[0m [34mbisync resync resync-mode=path2[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
{
|
||||
"Modtime": true,
|
||||
"Size": true,
|
||||
"Checksum": false,
|
||||
"NoSlowHash": false,
|
||||
"SlowHashSyncOnly": false,
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(16) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
[36m(17) :[0m [34mtouch-glob 2002-07-23 {datadir/} file1R.txt[0m
|
||||
[36m(18) :[0m [34mcopy-as {datadir/}file1R.txt {path2/} file1.txt[0m
|
||||
[36m(19) :[0m [34mtouch-glob 2002-08-26 {datadir/} file1L.txt[0m
|
||||
[36m(20) :[0m [34mcopy-as {datadir/}file1L.txt {path1/} file1.txt[0m
|
||||
|
||||
[36m(21) :[0m [34mtest bisync run with --resync-mode=larger[0m
|
||||
[36m(22) :[0m [34mbisync resync resync-mode=larger[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
{
|
||||
"Modtime": true,
|
||||
"Size": true,
|
||||
"Checksum": false,
|
||||
"NoSlowHash": false,
|
||||
"SlowHashSyncOnly": false,
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : file1.txt: Path2 is larger. Path1: 33, Path2: 42, Difference: 9
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(23) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
[36m(24) :[0m [34mtouch-glob 2003-07-23 {datadir/} file1R.txt[0m
|
||||
[36m(25) :[0m [34mcopy-as {datadir/}file1R.txt {path2/} file1.txt[0m
|
||||
[36m(26) :[0m [34mtouch-glob 2003-09-04 {datadir/} file1L.txt[0m
|
||||
[36m(27) :[0m [34mcopy-as {datadir/}file1L.txt {path1/} file1.txt[0m
|
||||
|
||||
[36m(28) :[0m [34mtest bisync run with --resync-mode=older[0m
|
||||
[36m(29) :[0m [34mbisync resync resync-mode=older[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
{
|
||||
"Modtime": true,
|
||||
"Size": true,
|
||||
"Checksum": false,
|
||||
"NoSlowHash": false,
|
||||
"SlowHashSyncOnly": false,
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : file1.txt: Path2 is older. Path1: 2003-09-03 20:00:00 -0400 EDT, Path2: 2003-07-22 20:00:00 -0400 EDT, Difference: 1032h0m0s
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(30) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
[36m(31) :[0m [34mtouch-glob 2004-07-23 {datadir/} file1R.txt[0m
|
||||
[36m(32) :[0m [34mcopy-as {datadir/}file1R.txt {path2/} file1.txt[0m
|
||||
[36m(33) :[0m [34mtouch-glob 2004-07-23 {datadir/} file1L.txt[0m
|
||||
[36m(34) :[0m [34mcopy-as {datadir/}file1L.txt {path1/} file1.txt[0m
|
||||
|
||||
[36m(35) :[0m [34mtest bisync run with --resync-mode=smaller[0m
|
||||
[36m(36) :[0m [34mbisync resync resync-mode=smaller[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
{
|
||||
"Modtime": true,
|
||||
"Size": true,
|
||||
"Checksum": false,
|
||||
"NoSlowHash": false,
|
||||
"SlowHashSyncOnly": false,
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : file1.txt: Path1 is smaller. Path1: 33, Path2: 42, Difference: 9
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : file1.txt: Path1 is smaller. Path1: 33, Path2: 42, Difference: 9
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(37) :[0m [34mtest changed on both paths and NOT identical - file1 (file1R, file1L)[0m
|
||||
[36m(38) :[0m [34mtouch-glob 2005-01-02 {datadir/} file1R.txt[0m
|
||||
[36m(39) :[0m [34mcopy-as {datadir/}file1R.txt {path2/} file1.txt[0m
|
||||
[36m(40) :[0m [34mcopy-as {datadir/}file1R.txt {path1/} file2.txt[0m
|
||||
[36m(41) :[0m [34mtouch-glob 2006-03-04 {datadir/} file1L.txt[0m
|
||||
[36m(42) :[0m [34mcopy-as {datadir/}file1L.txt {path1/} file1.txt[0m
|
||||
[36m(43) :[0m [34mcopy-as {datadir/}file1L.txt {path2/} file2.txt[0m
|
||||
|
||||
[36m(44) :[0m [34mtest bisync run with --resync-mode=path1[0m
|
||||
[36m(45) :[0m [34mbisync resync resync-mode=path1[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
{
|
||||
"Modtime": true,
|
||||
"Size": true,
|
||||
"Checksum": false,
|
||||
"NoSlowHash": false,
|
||||
"SlowHashSyncOnly": false,
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(46) :[0m [34mtest no winner[0m
|
||||
[36m(47) :[0m [34mtouch-glob 2022-02-22 {datadir/} file1R.txt[0m
|
||||
[36m(48) :[0m [34mcopy-as {datadir/}file1R.txt {path2/} file1.txt[0m
|
||||
[36m(49) :[0m [34mcopy-as {datadir/}file1R.txt {path1/} file2.txt[0m
|
||||
[36m(50) :[0m [34mtouch-glob 2022-02-22 {datadir/} file1L.txt[0m
|
||||
[36m(51) :[0m [34mcopy-as {datadir/}file1L.txt {path1/} file1.txt[0m
|
||||
[36m(52) :[0m [34mcopy-as {datadir/}file1L.txt {path2/} file2.txt[0m
|
||||
|
||||
[36m(53) :[0m [34mtest bisync run with --resync-mode=newer[0m
|
||||
[36m(54) :[0m [34mbisync resync resync-mode=newer[0m
|
||||
INFO : [2mSetting --ignore-listing-checksum as neither --checksum nor --compare checksum are set.[0m
|
||||
INFO : Bisyncing with Comparison Settings:
|
||||
{
|
||||
"Modtime": true,
|
||||
"Size": true,
|
||||
"Checksum": false,
|
||||
"NoSlowHash": false,
|
||||
"SlowHashSyncOnly": false,
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
1
cmd/bisync/testdata/test_resync_modes/initial/RCLONE_TEST
vendored
Normal file
1
cmd/bisync/testdata/test_resync_modes/initial/RCLONE_TEST
vendored
Normal file
@ -0,0 +1 @@
|
||||
This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete.
|
0
cmd/bisync/testdata/test_resync_modes/initial/file1.txt
vendored
Normal file
0
cmd/bisync/testdata/test_resync_modes/initial/file1.txt
vendored
Normal file
0
cmd/bisync/testdata/test_resync_modes/initial/file2.txt
vendored
Normal file
0
cmd/bisync/testdata/test_resync_modes/initial/file2.txt
vendored
Normal file
1
cmd/bisync/testdata/test_resync_modes/modfiles/file1L.txt
vendored
Normal file
1
cmd/bisync/testdata/test_resync_modes/modfiles/file1L.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
This file is NOT identical to 1R
|
1
cmd/bisync/testdata/test_resync_modes/modfiles/file1R.txt
vendored
Normal file
1
cmd/bisync/testdata/test_resync_modes/modfiles/file1R.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
This file is NOT identical to 1L (LARGER)
|
1
cmd/bisync/testdata/test_resync_modes/modfiles/file2.txt
vendored
Normal file
1
cmd/bisync/testdata/test_resync_modes/modfiles/file2.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
This file is identical on both sides
|
70
cmd/bisync/testdata/test_resync_modes/scenario.txt
vendored
Normal file
70
cmd/bisync/testdata/test_resync_modes/scenario.txt
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
test resync-mode
|
||||
# Check conflict-resolution options during resync
|
||||
# - Changed on Path2 and on Path1, and NOT identical file1 (file1r, file1l)
|
||||
|
||||
test changed on both paths and NOT identical - file1 (file1R, file1L)
|
||||
touch-glob 2001-01-02 {datadir/} file1R.txt
|
||||
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
||||
touch-glob 2001-03-04 {datadir/} file1L.txt
|
||||
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
||||
|
||||
test bisync run with --resync-mode=newer
|
||||
bisync resync resync-mode=newer
|
||||
|
||||
test changed on both paths and NOT identical - file1 (file1R, file1L)
|
||||
touch-glob 2001-07-23 {datadir/} file1R.txt
|
||||
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
||||
touch-glob 2001-08-26 {datadir/} file1L.txt
|
||||
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
||||
|
||||
test bisync run with --resync-mode=path2
|
||||
bisync resync resync-mode=path2
|
||||
|
||||
test changed on both paths and NOT identical - file1 (file1R, file1L)
|
||||
touch-glob 2002-07-23 {datadir/} file1R.txt
|
||||
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
||||
touch-glob 2002-08-26 {datadir/} file1L.txt
|
||||
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
||||
|
||||
test bisync run with --resync-mode=larger
|
||||
bisync resync resync-mode=larger
|
||||
|
||||
test changed on both paths and NOT identical - file1 (file1R, file1L)
|
||||
touch-glob 2003-07-23 {datadir/} file1R.txt
|
||||
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
||||
touch-glob 2003-09-04 {datadir/} file1L.txt
|
||||
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
||||
|
||||
test bisync run with --resync-mode=older
|
||||
bisync resync resync-mode=older
|
||||
|
||||
test changed on both paths and NOT identical - file1 (file1R, file1L)
|
||||
touch-glob 2004-07-23 {datadir/} file1R.txt
|
||||
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
||||
touch-glob 2004-07-23 {datadir/} file1L.txt
|
||||
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
||||
|
||||
test bisync run with --resync-mode=smaller
|
||||
bisync resync resync-mode=smaller
|
||||
|
||||
test changed on both paths and NOT identical - file1 (file1R, file1L)
|
||||
touch-glob 2005-01-02 {datadir/} file1R.txt
|
||||
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
||||
copy-as {datadir/}file1R.txt {path1/} file2.txt
|
||||
touch-glob 2006-03-04 {datadir/} file1L.txt
|
||||
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
||||
copy-as {datadir/}file1L.txt {path2/} file2.txt
|
||||
|
||||
test bisync run with --resync-mode=path1
|
||||
bisync resync resync-mode=path1
|
||||
|
||||
test no winner
|
||||
touch-glob 2022-02-22 {datadir/} file1R.txt
|
||||
copy-as {datadir/}file1R.txt {path2/} file1.txt
|
||||
copy-as {datadir/}file1R.txt {path1/} file2.txt
|
||||
touch-glob 2022-02-22 {datadir/} file1L.txt
|
||||
copy-as {datadir/}file1L.txt {path1/} file1.txt
|
||||
copy-as {datadir/}file1L.txt {path2/} file2.txt
|
||||
|
||||
test bisync run with --resync-mode=newer
|
||||
bisync resync resync-mode=newer
|
@ -14,10 +14,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest 1. delete path1 subdir file[0m
|
||||
|
@ -13,10 +13,11 @@ INFO : Bisyncing with Comparison Settings:
|
||||
"DownloadHash": false
|
||||
}
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying UNIQUE files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying UNIQUE OR DIFFERING files to[0m - [36mPath2[0m
|
||||
INFO : Copying Path2 files to Path1
|
||||
INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m
|
||||
INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m
|
||||
INFO : Resync updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : [32mBisync successful[0m
|
||||
|
||||
[36m(04) :[0m [34mtest changed on both paths - file5 (file5R, file5L)[0m
|
||||
|
@ -159,10 +159,10 @@ as the last step in the process.
|
||||
### --resync
|
||||
|
||||
This will effectively make both Path1 and Path2 filesystems contain a
|
||||
matching superset of all files. Path2 files that do not exist in Path1 will
|
||||
matching superset of all files. By default, Path2 files that do not exist in Path1 will
|
||||
be copied to Path1, and the process will then copy the Path1 tree to Path2.
|
||||
|
||||
The `--resync` sequence is roughly equivalent to:
|
||||
The `--resync` sequence is roughly equivalent to the following (but see [`--resync-mode`](#resync-mode) for other options):
|
||||
```
|
||||
rclone copy Path2 Path1 --ignore-existing [--create-empty-src-dirs]
|
||||
rclone copy Path1 Path2 [--create-empty-src-dirs]
|
||||
@ -173,8 +173,8 @@ or bisync will fail. This is required for safety - that bisync can verify
|
||||
that both paths are valid.
|
||||
|
||||
When using `--resync`, a newer version of a file on the Path2 filesystem
|
||||
will be overwritten by the Path1 filesystem version.
|
||||
(Note that this is [NOT entirely symmetrical](https://github.com/rclone/rclone/issues/5681#issuecomment-938761815).)
|
||||
will (by default) be overwritten by the Path1 filesystem version.
|
||||
(Note that this is [NOT entirely symmetrical](https://github.com/rclone/rclone/issues/5681#issuecomment-938761815), and more symmetrical options can be specified with the [`--resync-mode`](#resync-mode) flag.)
|
||||
Carefully evaluate deltas using [--dry-run](/flags/#non-backend-flags).
|
||||
|
||||
For a resync run, one of the paths may be empty (no files in the path tree).
|
||||
@ -186,7 +186,12 @@ For a non-resync run, either path being empty (no files in the tree) fails with
|
||||
This is a safety check that an unexpected empty path does not result in
|
||||
deleting **everything** in the other path.
|
||||
|
||||
**Note:** `--resync` should only be used under three specific (rare) circumstances:
|
||||
Note that `--resync` implies `--resync-mode path1` unless a different
|
||||
[`--resync-mode`](#resync-mode) is explicitly specified.
|
||||
It is not necessary to use both the `--resync` and `--resync-mode` flags --
|
||||
either one is sufficient without the other.
|
||||
|
||||
**Note:** `--resync` (including `--resync-mode`) should only be used under three specific (rare) circumstances:
|
||||
1. It is your _first_ bisync run (between these two paths)
|
||||
2. You've just made changes to your bisync settings (such as editing the contents of your `--filters-file`)
|
||||
3. There was an error on the prior run, and as a result, bisync now requires `--resync` to recover
|
||||
@ -196,6 +201,84 @@ Therefore, if you included `--resync` for every bisync run, it would never be po
|
||||
the deleted file would always keep reappearing at the end of every run (because it's being copied from the other side where it still exists).
|
||||
Similarly, renaming a file would always result in a duplicate copy (both old and new name) on both sides.
|
||||
|
||||
If you find that frequent interruptions from #3 are an issue, rather than
|
||||
automatically running `--resync`, the recommended alternative is to use the
|
||||
[`--resilient`](#resilient), [`--recover`](#recover), and
|
||||
[`--conflict-resolve`](#conflict-resolve) flags, (along with [Graceful
|
||||
Shutdown](#graceful-shutdown) mode, when needed) for a very robust
|
||||
"set-it-and-forget-it" bisync setup that can automatically bounce back from
|
||||
almost any interruption it might encounter. Consider adding something like the
|
||||
following:
|
||||
|
||||
```
|
||||
--resilient --recover --max-lock 2m --conflict-resolve newer
|
||||
```
|
||||
|
||||
### --resync-mode CHOICE {#resync-mode}
|
||||
|
||||
In the event that a file differs on both sides during a `--resync`,
|
||||
`--resync-mode` controls which version will overwrite the other. The supported
|
||||
options are similar to [`--conflict-resolve`](#conflict-resolve). For all of
|
||||
the following options, the version that is kept is referred to as the "winner",
|
||||
and the version that is overwritten (deleted) is referred to as the "loser".
|
||||
The options are named after the "winner":
|
||||
|
||||
- `path1` - (the default) - the version from Path1 is unconditionally
|
||||
considered the winner (regardless of `modtime` and `size`, if any). This can be
|
||||
useful if one side is more trusted or up-to-date than the other, at the time of
|
||||
the `--resync`.
|
||||
- `path2` - same as `path1`, except the path2 version is considered the winner.
|
||||
- `newer` - the newer file (by `modtime`) is considered the winner, regardless
|
||||
of which side it came from. This may result in having a mix of some winners
|
||||
from Path1, and some winners from Path2. (The implementation is analagous to
|
||||
running `rclone copy --update` in both directions.)
|
||||
- `older` - same as `newer`, except the older file is considered the winner,
|
||||
and the newer file is considered the loser.
|
||||
- `larger` - the larger file (by `size`) is considered the winner (regardless
|
||||
of `modtime`, if any). This can be a useful option for remotes without
|
||||
`modtime` support, or with the kinds of files (such as logs) that tend to grow
|
||||
but not shrink, over time.
|
||||
- `smaller` - the smaller file (by `size`) is considered the winner (regardless
|
||||
of `modtime`, if any).
|
||||
|
||||
For all of the above options, note the following:
|
||||
- If either of the underlying remotes lacks support for the chosen method, it
|
||||
will be ignored and will fall back to the default of `path1`. (For example, if
|
||||
`--resync-mode newer` is set, but one of the paths uses a remote that doesn't
|
||||
support `modtime`.)
|
||||
- If a winner can't be determined because the chosen method's attribute is
|
||||
missing or equal, it will be ignored, and bisync will instead try to determine
|
||||
whether the files differ by looking at the other `--compare` methods in effect.
|
||||
(For example, if `--resync-mode newer` is set, but the Path1 and Path2 modtimes
|
||||
are identical, bisync will compare the sizes.) If bisync concludes that they
|
||||
differ, preference is given to whichever is the "source" at that moment. (In
|
||||
practice, this gives a slight advantage to Path2, as the 2to1 copy comes before
|
||||
the 1to2 copy.) If the files _do not_ differ, nothing is copied (as both sides
|
||||
are already correct).
|
||||
- These options apply only to files that exist on both sides (with the same
|
||||
name and relative path). Files that exist *only* on one side and not the other
|
||||
are *always* copied to the other, during `--resync` (this is one of the main
|
||||
differences between resync and non-resync runs.).
|
||||
- `--conflict-resolve`, `--conflict-loser`, and `--conflict-suffix` do not
|
||||
apply during `--resync`, and unlike these flags, nothing is renamed during
|
||||
`--resync`. When a file differs on both sides during `--resync`, one version
|
||||
always overwrites the other (much like in `rclone copy`.) (Consider using
|
||||
[`--backup-dir`](#backup-dir1-and-backup-dir2) to retain a backup of the losing
|
||||
version.)
|
||||
- Unlike for `--conflict-resolve`, `--resync-mode none` is not a valid option
|
||||
(or rather, it will be interpreted as "no resync", unless `--resync` has also
|
||||
been specified, in which case it will be ignored.)
|
||||
- Winners and losers are decided at the individual file-level only (there is
|
||||
not currently an option to pick an entire winning directory atomically,
|
||||
although the `path1` and `path2` options typically produce a similar result.)
|
||||
- To maintain backward-compatibility, the `--resync` flag implies
|
||||
`--resync-mode path1` unless a different `--resync-mode` is explicitly
|
||||
specified. Similarly, all `--resync-mode` options (except `none`) imply
|
||||
`--resync`, so it is not necessary to use both the `--resync` and
|
||||
`--resync-mode` flags simultaneously -- either one is sufficient without the
|
||||
other.
|
||||
|
||||
|
||||
### --check-access
|
||||
|
||||
Access check files are an additional safety measure against data loss.
|
||||
@ -1752,6 +1835,7 @@ instead of of `--size-only`, when `check` is not available.
|
||||
* New `--recover` flag allows robust recovery in the event of interruptions, without requiring `--resync`.
|
||||
* A new `--max-lock` setting allows lock files to automatically renew and expire, for better automatic recovery when a run is interrupted.
|
||||
* Bisync now supports auto-resolving sync conflicts and customizing rename behavior with new [`--conflict-resolve`](#conflict-resolve), [`--conflict-loser`](#conflict-loser), and [`--conflict-suffix`](#conflict-suffix) flags.
|
||||
* A new [`--resync-mode`](#resync-mode) flag allows more control over which version of a file gets kept during a `--resync`.
|
||||
|
||||
### `v1.64`
|
||||
* Fixed an [issue](https://forum.rclone.org/t/bisync-bugs-and-feature-requests/37636#:~:text=1.%20Dry%20runs%20are%20not%20completely%20dry)
|
||||
|
Loading…
Reference in New Issue
Block a user