From 6fd5ef2d99e6528e911e45585b850e2bf0dd17a4 Mon Sep 17 00:00:00 2001 From: Tomasz Mazur Date: Tue, 25 Oct 2016 22:36:45 +0200 Subject: [PATCH] Update B2 docs with Data usage, and Crypt section --- docs/content/b2.md | 49 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) 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" --- 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