Overwrite smaller files on dest?

I have 2 remotes - Amazon Cloud (source) and Hubic (destination). I try to transfer all files from source to destination. What I need - to overwrite all files on destination, which are smaller (or, ok, at least different size) than on source. Files on destination (if exist) are newer than on source. I try different parameters combinations with sync, copy and copyto, but get only 1 from 2:

  • all files are copied;
  • only files, which does not exist at destination, copied.

I have ‘a bit too much’ (~5TB) data for just ‘copy all and forget problem’.

If you want to simply overwrite the files on the destination using only the side, then you can simply use the --size-only flag. I’d suggest you use --dry-run to make sure that is what you wanted.

Does not work, at least for versions 1.36 and 1.37 :frowning_face:

Transferred: 0 Bytes (0 Bytes/s)
Errors: 0
Checks: 300
Transferred: 0
Elapsed time: 1m33.4s

For ALL files I get

2017/08/18 08:14:40 DEBUG : xxxx.rar: Destination is newer than source, skipping

So, possible, flag --size-only does not work?

I make a test run… Looks like BUG :frowning:

rclone.exe version
rclone v1.37

rclone.exe lsl HuBiC:default\test1
3589 2017-08-18 11:03:58.301000000 kaka.xml
3988 2017-08-18 11:03:59.498000000 kaka2.xml

rclone.exe lsl ACD:\test2
10768 2017-08-18 10:23:21.407000000 kaka.xml
3988 2017-08-18 10:23:16.099000000 kaka2.xml
10768 2017-08-18 10:23:17.955000000 kaka3.xml

rclone.exe sync ACD:\test2 HuBiC:default\test1 -u --no-check-certificate --delete-excluded --size-only --log-level DEBUG --log-file log004.log

rclone.exe lsl HuBiC:default\test1
3589 2017-08-18 11:03:58.301000000 kaka.xml
3988 2017-08-18 11:03:59.498000000 kaka2.xml
10768 2017-08-18 10:23:17.955000000 kaka3.xml

------- log file of sync operation here:
2017/08/18 11:18:09 DEBUG : rclone: Version “v1.37” starting with parameters [“rclone.exe” “sync” “ACD:\test2” “HuBiC:default\test1” “-u” “–no-check-certificate” “–delete-excluded” “–size-only” “–log-level” “DEBUG” “–log-file” “log004.log”]
2017/08/18 11:18:20 DEBUG : Hubic: Got swift credentials (expiry 2017-08-18 12:22:16 +0200 +0200 in 2h3m55.9931257s)
2017/08/18 11:18:24 INFO : amazon drive root ‘test2’: Modify window not supported
2017/08/18 11:18:27 INFO : Hubic Swift container default path test1/: Waiting for checks to finish
2017/08/18 11:18:27 DEBUG : kaka.xml: Destination is newer than source, skipping
2017/08/18 11:18:29 DEBUG : kaka2.xml: Destination is newer than source, skipping
2017/08/18 11:18:30 INFO : Hubic Swift container default path test1/: Waiting for transfers to finish
2017/08/18 11:18:41 INFO : kaka3.xml: Copied (new)
2017/08/18 11:18:41 INFO : Waiting for deletions to finish
2017/08/18 11:18:41 INFO :
Transferred: 10.516 kBytes (211 Bytes/s)
Errors: 0
Checks: 2
Transferred: 1
Elapsed time: 50.9s

2017/08/18 11:18:42 DEBUG : Go routines at exit 12
2017/08/18 11:18:42 DEBUG : rclone: Version “v1.37” finishing with parameters [“rclone.exe” “sync” “ACD:\test2” “HuBiC:default\test1” “-u” “–no-check-certificate” “–delete-excluded” “–size-only” “–log-level” “DEBUG” “–log-file” “log004.log”]

Looks like bug is in parameters reading. If I put “–size-only” as first parameter - “all works as expected”…

all my flags are always before my commands. In the docs its that way too.

Syntax: [options] subcommand <parameters…>

where options are the flags.

The only time i’ve really seen it after is with the backup flag.