Moveto overwritting files with --immutable

What is the problem you are having with rclone?
If a file exists with an identical path but with a different size to the file being moved using rclone moveto this file shouldn't be overwritten with the file of the different size, how can I prevent this? I did try --immutable as this works from what I have seen when using rclone move.

Run the command 'rclone version' and share the full output of the command.

rclone v1.71.0
- os/version: debian 12.1 (64 bit)
- os/kernel: 6.2.16-12-pve (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.25.0
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)
Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

/usr/bin/rclone moveto '/path/to/Disk1.jpg' gmedia:'/path/to/Disk1.jpg' --dry-run --buffer-size 500M --bwlimit '04:55,1M 11:00,off 12:00,1M 01:00,off' --checkers 2 --checksum --fast-list --immutable --log-level DEBUG --low-level-retries 999999 --no-update-modtime --no-update-dir-modtime --retries 999999 --stats 0 --stats-file-name-length 75 --tpslimit 1 --tpslimit-burst 1 --transfers 1 --use-mmap --user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36";

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[gmedia]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
root_folder_id = XXX
copy_shortcut_content = true
export_formats = docx,xlsx,pptx,svg,pdf
chunk_size = 256Mi
acknowledge_abuse = true
server_side_across_configs = true
token = XXX
team_drive =

A log from the command that you were trying to run with the -vv flag

2025/09/05 08:55:55 INFO  : Starting bandwidth limiter at 1Mi Byte/s
2025/09/05 08:55:55 INFO  : Starting transaction limiter: max 1 transactions/s with burst 1
2025/09/05 08:55:55 DEBUG : rclone: Version "v1.71.0" starting with parameters ["/usr/bin/rclone" "moveto" "/path/to/Disk1.jpg" "gmedia:path/to/Disk1.jpg" "--dry-run" "--buffer-size" "500M" "--bwlimit" "04:55,1M 11:00,off 12:00,1M 01:00,off" "--checkers" "2" "--checksum" "--fast-list" "--immutable" "--log-level" "DEBUG" "--low-level-retries" "999999" "--no-update-modtime" "--no-update-dir-modtime" "--retries" "999999" "--stats" "0" "--stats-file-name-length" "75" "--tpslimit" "1" "--tpslimit-burst" "1" "--transfers" "1" "--use-mmap" "--user-agent" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"]
2025/09/05 08:55:55 DEBUG : Creating backend with remote "/path/to/Disk1.jpg"
2025/09/05 08:55:55 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2025/09/05 08:55:55 DEBUG : fs cache: renaming child cache item "/path/to/Disk1.jpg" to be canonical for parent "/path/to"
2025/09/05 08:55:55 DEBUG : Creating backend with remote "gmedia:path/to/"
2025/09/05 08:56:08 DEBUG : fs cache: renaming cache item "gmedia:path/to/" to be canonical "gmedia:path/to"
2025/09/05 08:56:08 DEBUG : Disk1.jpg: Sizes differ (src 288498 vs dst 242914)
2025/09/05 08:56:08 NOTICE: Disk1.jpg: Skipped move as --dry-run is set (size 281.736Ki)
2025/09/05 08:56:08 DEBUG : 6 go routines active

You can use:

--ignore-existing

If I did –ignore-existing if the two files match identically as in same hash, would it still be removed from local storage.

Just test it if you aren’t sure with a dry run or with some dummy files:

root@gemini:/mnt/user/data/scripts/rclone# touch one two
root@gemini:/mnt/user/data/scripts/rclone# ./rclone moveto one two --ignore-existing -vv
2025/09/05 07:06:27 DEBUG : rclone: Version "v1.71.0" starting with parameters ["./rclone" "moveto" "one" "two" "--ignore-existing" "-vv"]
2025/09/05 07:06:27 DEBUG : Creating backend with remote "one"
2025/09/05 07:06:27 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
2025/09/05 07:06:27 DEBUG : fs cache: renaming child cache item "one" to be canonical for parent "/mnt/user/data/scripts/rclone"
2025/09/05 07:06:27 DEBUG : Creating backend with remote "."
2025/09/05 07:06:27 DEBUG : fs cache: renaming cache item "." to be canonical "/mnt/user/data/scripts/rclone"
2025/09/05 07:06:27 DEBUG : one: Destination exists, skipping
2025/09/05 07:06:27 DEBUG : one: Not removing source file as destination file exists and --ignore-existing is set
2025/09/05 07:06:27 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         0.0s

2025/09/05 07:06:27 DEBUG : 4 go routines active
root@gemini:/mnt/user/data/scripts/rclone# ls
one  rclone*  two

Just tried if the file exists and the hashes and size match it gets ignored still when using –ignore-existing

  1. can’t see your screen so I don’t knwo what you did

  2. I don’t know what you are trying to do exactly as it doesn’t make sense.

      --ignore-size                                 Ignore size when skipping use modtime or checksum

Oh I just added –ignore-existing to the command I provided in my initial post.

I didn’t add –ignore-size or have that in the initial command.

Do I add both of those into the command I originally provided?

The hashes are different below, but it seems to still want to replace the file. Is that intended?

/usr/bin/rclone moveto '/path/to/Disk1.jpg' gmedia_rince_api_2:'path/to/Disk1.jpg' --dry-run --buffer-size 500M --bwlimit '04:55,1M 11:00,off 12:00,1M 01:00,off' --checkers 2 --checksum --fast-list --ignore-size --immutable --log-level DEBUG --low-level-retries 999999 --no-update-modtime --no-update-dir-modtime --retries 999999 --stats 0 --stats-file-name-length 75 --tpslimit 1 --tpslimit-burst 1 --transfers 1 --use-mmap --user-agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36";```
2025/09/05 11:51:24 INFO  : Starting transaction limiter: max 1 transactions/s with burst 1
2025/09/05 11:51:24 DEBUG : rclone: Version "v1.71.0" starting with parameters ["/usr/bin/rclone" "moveto" "/path/to/Disk1.jpg" "gmedia:path/to/Disk1.jpg" "--dry-run" "--buffer-size" "500M" "--bwlimit" "04:55,1M 11:00,off 12:00,1M 01:00,off" "--checkers" "2" "--checksum" "--fast-list" "--ignore-size" "--immutable" "--log-level" "DEBUG" "--low-level-retries" "999999" "--no-update-modtime" "--no-update-dir-modtime" "--retries" "999999" "--stats" "0" "--stats-file-name-length" "75" "--tpslimit" "1" "--tpslimit-burst" "1" "--transfers" "1" "--use-mmap" "--user-agent" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"]
2025/09/05 11:51:24 DEBUG : Creating backend with remote "/path/to/Disk1.jpg"
2025/09/05 11:51:24 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2025/09/05 11:51:24 DEBUG : fs cache: renaming child cache item "/path/to/Disk1.jpg" to be canonical for parent "/path/to"
2025/09/05 11:51:24 DEBUG : Creating backend with remote "gmedia:path/to/"
2025/09/05 11:51:36 DEBUG : fs cache: renaming cache item "gmedia:path/to/" to be canonical "gmedia2:path/to"
2025/09/05 11:51:37 DEBUG : Disk1.jpg: md5 = 186f8536ae144b358d2d6e1d9cd54aec (Local file system at /path/to
2025/09/05 11:51:37 DEBUG : Disk1.jpg: md5 = 9e6eee8be44b4c3ec5b11117eb0925a4 (Google drive root 'path/to')
2025/09/05 11:51:37 DEBUG : Disk1.jpg: md5 differ
2025/09/05 11:51:37 NOTICE: Disk1.jpg: Skipped move as --dry-run is set (size 281.736Ki)
2025/09/05 11:51:37 DEBUG : 6 go routines active

I’m still not following what parameters/rule set are deciding if you want to upload a file or not.

You have a bunch of options:

 --ignore-checksum                             Skip post copy check of checksums
      --ignore-existing                             Skip all files that exist on destination
      --ignore-size                                 Ignore size when skipping use modtime or checksum

You’d have to describe what you are trying to do and what rules for uploading you are trying to accomplish.

These are the rules.

  1. if source and destination checksums match, delete the local copy.
  2. If source exists and destination doesn’t exist, upload the file.
  3. if source exists and destination exists, and file sizes are different, or hashes are different don’t overwrite the destination file and don’t upload the local file.

IMO you can’t do this in rclone one liner command. You have to create some sort of script wrapper, read both files attributes and based on your rules apply some action. Few rclone commands and some conditional statement is what you need.

You can ‘almost’ do this.

1/2 are just normal stuff.

3 is where it gets odd. You can use ignore-existing, but ignore-existing for some reason doesn’t delete the source on a move. I could argue the behavior either way as I’m only ignoring the existing dest and I want to delete the source.

Could be a new flag though to as once you try to do all 3 at the same time, that’s where the problem lies.

Could I request this new flag please?

Sure → Issues · rclone/rclone