Rclone downloads empty 0 Byte Files

Problem:

I setup rclone with an encrypted remote to use with b2 and I was able to upload a test file to my bucket. But when i try to download it using "copy" or "sync", the file gets downloaded but its of 0 BYTES.

I have a single png file in my bucket. My local directory was cleared before entering sync/copy.

Rclone version:

rclone v1.53.1
os/arch: linux/amd64
go version: go1.15

OS:

Ubuntu 20.04.1 LTS

Storage system:

Backblaze B2

Command:

1. rclone copy archive-b2-crypt:/ /home/me/Desktop/test --progress
2. rclone sync archive-b2-crypt:/ /home/me/Desktop/test --progress

The rclone config:

[archive-b2]
type = b2
account = 
key = 
hard_delete = false

[archive-b2-crypt]
type = crypt
remote = archive-b2:rclone-synced
filename_encryption = off
directory_name_encryption = false
password =

Log file:

Copy:

2020/10/14 00:56:22 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "copy" "archive-b2-crypt:/" "/home/me/Desktop/test" "--progress" "-vv" "--log-file=log.txt"]
2020/10/14 00:56:22 DEBUG : Using config file from "/home/me/.config/rclone/rclone.conf"
2020/10/14 00:56:22 DEBUG : Creating backend with remote "archive-b2-crypt:/"
2020/10/14 00:56:22 DEBUG : Creating backend with remote "archive-b2:rclone-synced/.bin"
2020/10/14 00:56:24 DEBUG : Creating backend with remote "archive-b2:rclone-synced"
2020/10/14 00:56:24 DEBUG : Creating backend with remote "/home/me/Desktop/test"
2020/10/14 00:56:24 DEBUG : Local file system at /home/me/Desktop/test: Waiting for checks to finish
2020/10/14 00:56:24 DEBUG : Local file system at /home/me/Desktop/test: Waiting for transfers to finish
2020/10/14 00:56:26 INFO  : Firefox_wallpaper.png: Copied (new)
2020/10/14 00:56:26 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         4.0s

2020/10/14 00:56:26 DEBUG : 8 go routines active

Sync:

2020/10/14 01:03:09 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "sync" "archive-b2-crypt:/" "/home/me/Desktop/test" "--progress" "-vv" "--log-file=log1.txt"]
2020/10/14 01:03:09 DEBUG : Using config file from "/home/me/.config/rclone/rclone.conf"
2020/10/14 01:03:09 DEBUG : Creating backend with remote "archive-b2-crypt:/"
2020/10/14 01:03:09 DEBUG : Creating backend with remote "archive-b2:rclone-synced/.bin"
2020/10/14 01:03:11 DEBUG : Creating backend with remote "archive-b2:rclone-synced"
2020/10/14 01:03:12 DEBUG : Creating backend with remote "/home/me/Desktop/test"
2020/10/14 01:03:12 DEBUG : Local file system at /home/me/Desktop/test: Waiting for checks to finish
2020/10/14 01:03:12 DEBUG : Local file system at /home/me/Desktop/test: Waiting for transfers to finish
2020/10/14 01:03:14 INFO  : Firefox_wallpaper.png: Copied (new)
2020/10/14 01:03:14 DEBUG : Waiting for deletions to finish
2020/10/14 01:03:14 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Transferred:            1 / 1, 100%
Elapsed time:         4.4s

2020/10/14 01:03:14 DEBUG : 8 go routines active

hello and welcome to the forum,

let's see what is in that remote
can you do a rclone ls archive-b2-crypt: -vv

2020/10/14 01:16:06 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "ls" "archive-b2-crypt:" "-vv"]
2020/10/14 01:16:06 DEBUG : Using config file from "/home/me/.config/rclone/rclone.conf"
2020/10/14 01:16:06 DEBUG : Creating backend with remote "archive-b2-crypt:"
2020/10/14 01:16:06 DEBUG : Creating backend with remote "archive-b2:rclone-synced"
        0 Firefox_wallpaper.png
2020/10/14 01:16:08 DEBUG : 6 go routines active

the file in the crypt is zero bytes.
the file downloaded is zero bytes

looks like rclone is working.

Fk I thought that number was for ordering, anyways, when I list contents using the normal remote "archive-br2" it shows that its 32 Bytes.

2020/10/14 01:19:29 DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "ls" "archive-b2:" "-vv"]
2020/10/14 01:19:29 DEBUG : Using config file from "/home/me/.config/rclone/rclone.conf"
2020/10/14 01:19:29 DEBUG : Creating backend with remote "archive-b2:"
       32 rclone-synced/Firefox_wallpaper.png.bin
2020/10/14 01:19:31 DEBUG : 6 go routines active

also this is the file in the bucket:
image

So how should i download the file? If i try to use sync on the normal remote, it downloads the encrypted file.

no worries, the crypt can be confusing at first.

if you upload a file to archive-b2-crypt:, rclone will encrypt it during upload.
so to download that file, you must download from archive-b2-crypt: and rclone will decrypt it during download.

as for the file size,
each file that is encrypted, has a header that is 32 bytes in size.
so a zero byte file plus 32 byte header equals 32 total bytes.

https://rclone.org/crypt/#examples

Wow now it makes sense. Thanks a lot man, was frustrated for the past 1 hour tying to figure it out.

wow, 1 hour over 0 bytes... :upside_down_face:

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