Can't set up rsync backup: unknown flag: --vfs-write-back

Hi. I’m looking into using Kopia to back up my personal files on Windows to Google Drive.

Using the rclone approach I get the following error when creating the backup destination:

..\rclone-v1.51.0-windows-amd64\rclone.exe config
... (Config using name>kopia-rclone-test; Storage> drive; scope> drive.file; root_folder_id> <specifc folder in my Google Drive. Tried uploading a file to the remote -- worked fine.)
kopia.exe repository create rclone --rclone-exe=..\rclone-v1.51.0-windows-amd64\rclone.exe --remote-path=kopia-rclone-test:/kopia-rclone-test --log-level=debug
DEBUG generating new TLS certificate
DEBUG adding alternative IP to certificate: 127.0.0.1
DEBUG starting ..\rclone-v1.51.0-windows-amd64\rclone.exe
DEBUG no writes in this session, no need to wait
DEBUG killing rclone
ERROR can't connect to storage: unable to start rclone: rclone server failed to start: 2022/12/26 23:14:32 Fatal error: unknown flag: --vfs-write-back

I’m not sure how rclone is supposed to work, but I also get the error when trying the following, but I’m probably lacking some command line stuff here:

.\rclone.exe serve webdav --vfs-write-back
Error: unknown flag: --vfs-write-back

Could it be a compatibility issue – wrong combination of kopia (0.12.1-windows-x64) and rclone (v1.51.0-windows-amd64)?
Could it be that this doesn’t properly work on Windows?

First update rclone. You’re on an outdated version. I couldn’t find it anywhere, but your version may not support the --vfs-write-back flag.
I’ve never seen that used with rclone serve, only rclone mount. I could be wrong, Kopia may use it under the hood some way that I’m unaware of.
Also, you have to specify a time for that flag. It’s telling rclone how long to store things cached on a mount before writing it back to the remote.

As an example (which you probably don’t need)
--vfs-write-back 3h
would tell rclone not to write a file back until it’s been unmodified on disk for 3 hours.

EDIT: I tried combining rclone serve with --vfs-write-back on my own system, and it barfs with the same error. I use --vfs-write-back regularly with no issue, using rclone mount

Thanks! I had downloaded rclone v1.61.1, but apparently had an old version of rclone laying around and didn’t realize I was using that one.

I’m still not able to create the repository though:

.\kopia.exe repository create rclone --rclone-exe=..\rclone-v1.61.1-windows-amd64\rclone.exe --remote-path=kopia-rclone-test --log-level=debug
DEBUG generating new TLS certificate
DEBUG adding alternative IP to certificate: 127.0.0.1
DEBUG starting ..\rclone-v1.61.1-windows-amd64\rclone.exe
DEBUG detected webdav address: https://127.0.0.1:62509/]
ERROR unable to get repository storage: error listing blobs: error processing directory shards: error reading directory: error reading WebDAV dir: ReadDir /: 404 Not Found - PROPFIND /

I’ve tried different ways of specifying the remote path: kopia-rclone-test, kopia-rclone-test: kopia-rclone-test:some-directory, kopia-rclone-test:/some-directory – same error.

Trying this from KopiaUI, I get the following, different, error:

Connect Error: INTERNAL: internal server error: connect error: unable to write blobcfg blob: PutBlob() failed for "kopia.blobcfg": error writing blob using WebDAV: unable to complete WriteTemporaryFileAndCreateParentDirs despite 10 retries: BLOB not found

Any further ideas?

I’ve also tried with the internal gdrive option, but I can’t get past the 15GB storage quota of the service account. Perhaps I should create a separate post about this, but essentially, I’m trying to back up to my Google Drive in some way, but am not succeeding…

It looks like your remote path may be formatted incorrectly. Also, what kind of remote are you using? There is not a built in, internal Google drive, in Kopia. Google Cloud Storage is not Google Drive.

Post your rclone config file with the secrets removed

Thanks a lot for trying to help me out with this!

I have used the following variants of rclone remotes:

[kopia-rclone-test]
type = drive
scope = drive.file
root_folder_id = <id of a Google Drive folder where I want the backup>
token = {"access_token":"...","token_type":"Bearer","refresh_token":"...","expiry":"2022-12-27T19:45:32.394167+01:00"}

[kopia-rclone-test-2]
type = drive
client_id = <client ID set up in Google Cloud>
client_secret = <client secret belonging to above client ID>
scope = drive.file
token = {"access_token":"......",,"token_type":"Bearer","refresh_token":"...","expiry":"2022-12-27T19:15:02.8829805+01:00"}
team_drive = 
root_folder_id = <id of a Google Drive folder where I want the backup>
use_trash = false
impersonate = <my e-mail address>     <-- I have also tried without this.

[kopia-rclone-test-full-access]
type = drive
client_id = <client ID set up in Google Cloud>
client_secret = <client secret belonging to above client ID>
scope = drive
token = {"access_token":"...","token_type":"Bearer","refresh_token":"...","expiry":"2022-12-27T19:36:38.4541196+01:00"}
team_drive = 

Regarding “internal Google drive”, I mean the method refered to as “native” on Repositories | Kopia.

I got this working quite easily, but it stopped with storageQuotaExceeded error after ~16 GB uploaded. I think I have hit the storage limit of the service account, but haven’t been able to figure out how to get it to actually use my full quota of 2 TB.

I’m doing the same thing in KopiaUI and getting the same error.

My rclone (v1.61.1) remote drive is configured like so:

- type: drive
- scope: drive
- token: {"access_token":"token","token_type":"Bearer","refresh_token":"token","expiry":"2022-12-27T18:57:15.6514956-05:00"}
- team_drive:

In KopiaUI (v0.12.1), I’m trying to create an “Rclone Remote” repository with the following configuration:

**Rclone Remote Path:**
drive:backups

**Rclone Executable Path:**
C:\Users\User\Desktop\rclone\rclone-v1.61.1-windows-amd64\rclone.exe

It lets me progress past the configuration page with no errors (which it doesn’t seem to do if either of the configuration options aren’t correct), but on the next page when I click “Create Repository” it gives the error.

Connect Error: INTERNAL: internal server error: connect error: unable to write blobcfg blob: PutBlob() failed for "kopia.blobcfg": error writing blob using WebDAV: unable to complete WriteTemporaryFileAndCreateParentDirs despite 10 retries: BLOB not found

Use rclone v1.60.1 https://github.com/kopia/kopia/issues/2655

Excellent! With rclone 1.60.1 I was able to start the backup from KopiaUI. It’s running now, and I will report back when the backup of ~250 GB has finished.

The backup finished successfully.

1 Like