Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Update B2 docs with Data usage, and Crypt section

Tomasz Mazur6fd5ef2d99e6
diff --git a/docs/content/b2.md b/docs/content/b2.md
index eff67147a..bb4a1800b 100644
--- a/docs/content/b2.md
+++ b/docs/content/b2.md
@@ -1,7 +1,7 @@
---
title: "B2"
description: "Backblaze B2"
-date: "2016-06-15"
+date: "2016-10-25"
---
<i class="fa fa-fire"></i>Backblaze B2
@@ -182,6 +182,53 @@ $ rclone -q --b2-versions ls b2:cleanup-test
9 one.txt
```
+### Data usage ###
+
+It is useful to know how many requests are sent to the server in different scenarios.
+
+All copy commands send the following 4 requests:
+
+```
+/b2api/v1/b2_authorize_account
+/b2api/v1/b2_create_bucket
+/b2api/v1/b2_list_buckets
+/b2api/v1/b2_list_file_names
+```
+
+The `b2_list_file_names` request will be sent once for every 1k files
+in the remote path, providing the checksum and modification time of
+the listed files. As of version 1.33 issue
+[#818](https://github.com/ncw/rclone/issues/818) causes extra requests
+to be sent when using B2 with Crypt. When a copy operation does not
+require any files to be uploaded, no more requests will be sent.
+
+Uploading files that do not require chunking, will send 2 requests per
+file upload:
+
+```
+/b2api/v1/b2_get_upload_url
+/b2api/v1/b2_upload_file/
+```
+
+Uploading files requiring chunking, will send 2 requests (one each to
+start and finish the upload) and another 2 requests for each chunk:
+
+```
+/b2api/v1/b2_start_large_file
+/b2api/v1/b2_get_upload_part_url
+/b2api/v1/b2_upload_part/
+/b2api/v1/b2_finish_large_file
+```
+
+### B2 with crypt ###
+
+When using B2 with `crypt` files are encrypted into a temporary
+location and streamed from there. This is required to calculate the
+encrypted file's checksum before beginning the upload. On Windows the
+%TMPDIR% environment variable is used as the temporary location. If
+the file requires chunking, both the chunking and encryption will take
+place in memory.
+
### Specific options ###
Here are the command line options specific to this cloud storage