1
mirror of https://github.com/rclone/rclone synced 2024-11-27 05:23:40 +01:00

Update B2 docs with Data usage, and Crypt section

This commit is contained in:
Tomasz Mazur 2016-10-25 22:36:45 +02:00 committed by Nick Craig-Wood
parent 87107413f5
commit 6fd5ef2d99

View File

@ -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