B2 - 2 file versions when uploading only once

What is the problem you are having with rclone?

I have mounted B2 on Windows using the command below, when I copy a file, rclone writes 2 versions of the file. This consumes double the space - I uploaded 5GB but I ended up with 10GB in B2. When I upload a file via B2 website, only 1 version is written. The rclone versions have the same sha hash.

What is your rclone version (output from rclone version)

rclone v1.54.1

  • os/arch: windows/amd64
  • go version: go1.15.8

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Windows 10 64bit

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

Backblaze B2

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

rclone.exe mount Backblaze:Backup Y: --vfs-cache-mode writes --log-file=C:\Users\A\rclonemount.txt --log-level DEBUG

The rclone config contents with secrets removed.

type = b2
account = xx
key = xx
hard_delete = true

A log from the command with the -vv flag

C:\Users\A\Downloads\rclone-v1.54.1-windows-amd64>rclone.exe lsf Backblaze:Backup --b2-versions

d4.log was uploaded manually

hello and welcome to the forum,

have you tested using rclone copy with a new file that is not already stored in B2?

Hi, just tried it with rclone copy and it copied a single version as expected.

I am using CryptSync and copy/paste paste operations to get files across, so I need to it to behave in the same way when remote is mounted.

Is this a bug or am I missing something feature/flag that I can disable at mount time?

never heard of it, it has some kind of "Run in background" feature, perhaps that is the problem?

for encryption, i use rclone crypt

try without the vfs cache and see what happens.
make sure to upload a new file, that is not already in B2

I tried without vfs cache but had the same problem.

Mount command:
rclone.exe mount Backblaze:Backup Y:

Copied and pasted file with Windows Explorer

I receive ERROR from rclone:

2021/03/12 17:42:28 ERROR : upload_no_vfs_cache.log: WriteFileHandle: Truncate: Can't change size without --vfs-cache-mode >= writes

But the file still uploads - twice:


CryptSync, yes, it's open source and can run in background. But I'm not using this feature - I am syncing on demand. I don't think that is the problem since 2 versions are uploaded even if I copy and paste with Windows Explorer

and if you copy a new local file using mount+vfs. not using that crypt software?

This will be probably be setting the mod time creating a new version.

I co-incidentally uploaded a potential fix for this - can you give it a go?

v1.55.0-beta.5263.d85940454.fix-vfs-modtime on branch fix-vfs-modtime

Hi, beta version resolved the issue when using vfs cache! Thanks for that.

FYI without vfs cache, it still uploads 2 files.


Depending on the app this is unavoidable.

Without cache, rclone will start uploading the file immedately the first byte is written by the app. If the app sets the modtime at the end of writing the data (which is a natural place to do it) it is too late for rclone to change the modtime of the file being uploaded (since you have to send the modtime at the start of the upload) so rclone has to do a server side copy and make a new version to set the modtime.

There are some other fixes on the same branch which need a bit more testing, but the fix for this should be in the beta in a few days then released in v1.55

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.