Rclone copy is trying to create new B2 bucket with each copy, what am I doing wrong

What is the problem you are having with rclone?

Rclone copy is trying to create a new bucket when I try to copy a file to an existing bucket.

What is your rclone version (output from rclone version)

- os/arch: linux/amd64
- go version: go1.13.6

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

Linux Ubuntu 20.04, 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 copy filename b2:bucket/

or

rclone copy filename b2:bucket/

This reports:

ERROR : Attempt 3/3 failed with 3 errors and: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)

The bucket exists, I can ls the contents, I successfully copied one file to it

hello,

rclone v1.53.2
- os/arch: linux/amd64
- go version: go1.15.3
  • if you post again, you need to post the exact command with debug log.
    add -vv to the command, post the command and output.

Okay thank you. I successfully updated to 1.53.2.

This is my command and output. Why is it trying to create a new remote bucket? Or, how do I upload to an existing bucket?

$ rclone copy 2002_cdr_BACKUP2.zip b2:old-drives/ -vv
2020/11/17 17:25:48 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "copy" "2002_cdr_BACKUP2.zip" "b2:old-drives/" "-vv"]
2020/11/17 17:25:48 DEBUG : Creating backend with remote "2002_cdr_BACKUP2.zip"
2020/11/17 17:25:48 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2020/11/17 17:25:48 DEBUG : fs cache: adding new entry for parent of "2002_cdr_BACKUP2.zip", "/media/user/backup/old"
2020/11/17 17:25:48 DEBUG : Creating backend with remote "b2:old-drives/"
2020/11/17 17:25:49 DEBUG : fs cache: renaming cache item "b2:old-drives/" to be canonical "b2:old-drives"
2020/11/17 17:25:49 DEBUG : 2002_cdr_BACKUP2.zip: Need to transfer - File not found at Destination
2020/11/17 17:25:50 ERROR : 2002_cdr_BACKUP2.zip: Failed to copy: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 17:25:50 ERROR : Attempt 1/3 failed with 1 errors and: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 17:25:50 DEBUG : 2002_cdr_BACKUP2.zip: Need to transfer - File not found at Destination
2020/11/17 17:25:50 ERROR : 2002_cdr_BACKUP2.zip: Failed to copy: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 17:25:50 ERROR : Attempt 2/3 failed with 1 errors and: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 17:25:50 DEBUG : 2002_cdr_BACKUP2.zip: Need to transfer - File not found at Destination
2020/11/17 17:25:51 ERROR : 2002_cdr_BACKUP2.zip: Failed to copy: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 17:25:51 ERROR : Attempt 3/3 failed with 1 errors and: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 17:25:51 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         2.2s

2020/11/17 17:25:51 DEBUG : 6 go routines active
2020/11/17 17:25:51 Failed to copy: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)

try rclone lsd b2: -vv

2020/11/17 17:41:46 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2020/11/17 17:41:46 DEBUG : Creating backend with remote "b2:"
          -1 2020-11-17 17:41:47        -1 usercloud
          -1 2020-11-17 17:41:47        -1 old-disks
          -1 2020-11-17 17:41:47        -1 plexcrypt
          -1 2020-11-17 17:41:47        -1 tempcrypt
2020/11/17 17:41:47 DEBUG : 6 go routines active```

strange as the old-drives does not exist

can you try this
rclone mkdir b2:old-drives -vv

make sure to post the entire output, not just a snippet, as the command is missing from that last post.

I must be mind-bendingly stupid, you're right.

Currently I am now copying the file successfully to b2:old-disks. This resolves my original complaint; it was user error.

However, just to continue exploring this, I've attached what happens with your suggested command.

Now, let me tell you one thing - I think I used to have a bucket called old-drives which I may have deleted. I'm not sure. I've started and deleted a number of buckets.

I have verified on the B2 interface itself that bucket old-drives does not currently exist. But I have a gut feeling it probably existed at one point.

rclone mkdir b2:old-drives -vv
2020/11/17 18:35:51 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "mkdir" "b2:old-drives" "-vv"]
2020/11/17 18:35:51 DEBUG : Creating backend with remote "b2:old-drives"
2020/11/17 18:35:51 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2020/11/17 18:35:51 DEBUG : B2 bucket old-drives: Making directory
2020/11/17 18:35:53 ERROR : Attempt 1/3 failed with 1 errors and: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 18:35:53 DEBUG : B2 bucket old-drives: Making directory
2020/11/17 18:35:54 ERROR : Attempt 2/3 failed with 1 errors and: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 18:35:54 DEBUG : B2 bucket old-drives: Making directory
2020/11/17 18:35:55 ERROR : Attempt 3/3 failed with 1 errors and: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)
2020/11/17 18:35:55 DEBUG : 6 go routines active
2020/11/17 18:35:55 Failed to mkdir: failed to create bucket: Bucket name is already in use (400 duplicate_bucket_name)

most cloud providers, a bucket name has to be unique for all users.
so if another b2 user created a bucket named old-drives, then you cannot use it.
and perhaps that is the reason for the error.

but the rclone output is confusing.

  1. File not found at Destination
    and then
  2. failed to create bucket
    seems rclone is stating that it checked the destination, did not find that file in the destination.
    but when trying to copy the file, rclone complains it cannot create the destination.

i hope an rclone expert will stop by soon and comment on this?

1 Like

I'm 90% sure that I had a bucket with that name and then deleted it, but you are right, I just checked the B2 faqs and the bucket name must be unique across all users (!)

I just logged into the b2 web interface and tried to create bucket old-drives and got Bucket name already in use.

So either it's already in use by someone else, or my earlier creation of it and deletion of it prevents me from using it again (maybe until the B2 servers release it, maybe they do periodic cleanups)

good, now we know for sure.
also, that rclone behaved as expected.

1 Like

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