Bisync maxDelete API

What is the problem you are having with rclone?

I only use rclone via API call and the maxDelete parameter for the bysinc api doesn't seem to do anything.

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

image
Running with the rclone/rclone:latest docker image

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

Using Onedrive and Nextcloud

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

the curl command :

curl --request POST \
  --url https://rclone.REDACTED/sync/bisync \
  --header 'Authorization: Basic REDACTED' \
  --header 'content-type: application/json' \
  --data '{
  "path1":"Onedrive-ISEN:/",
  "path2":"Nextcloud-Local:/Onedrive-ISEN",
  "checkSync":"true",
  "resync":"false",
  "dryRun":"false",
  "checkAccess":"true",
  "maxDelete": "100"
}'

The rclone config contents with secrets removed.

[Onedrive-ISEN]
type = onedrive
token = {"access_token":"REDACTED"}
drive_id = REDACTED
drive_type = business

[Nextcloud-Local]
type = webdav
pass = REDACTED
url = http://REDATED.netbird.cloud:8454/remote.php/dav/files/USER/
user = USER
vendor = nextcloud

A log from the command with the -vv flag

2023/03/29 12:06:23 ERROR : Safety abort: too many deletes (>0%, 2 of 421) on Path2 "Nextcloud-Local:Onedrive-ISEN/". Run with --force if desired.
2023/03/29 12:06:23 NOTICE: Bisync aborted. Please try again.

II had a look at the code.

It doesn't look obviously wrong.

I'd put some print statments in here cmd/bisync/rc.go to see if I could work out what is going on.

From the look of your log, maxDelete appears to have been parsed as 0?

I have rerun some bisync via api with different parameter and still the same error

Yes, It look like it

Can you try this?

Sorry for not responding sooner.
I need to add it to the source code and compile it for myself ?
I am not much of develloper (and not a go one), Sorry

I traced through the API and I think there was a bug.

Can you try this please?

v1.63.0-beta.6933.0a375197b.fix-bisync-maxdelete on branch fix-bisync-maxdelete (uploaded in 15-30 mins)

Delete now works.
Thanks you very much.
Will this fix be in the next release ?

Thanks for testing.

I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.63 (or maybe 1.62.3 if we make that).

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