From 62ef3e84c648f7ad7d25ee472682116a95813e18 Mon Sep 17 00:00:00 2001 From: Maciej Lech Date: Wed, 28 Oct 2020 08:37:22 +0100 Subject: [PATCH 1/3] Update the docs --- b2/console_tool.py | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/b2/console_tool.py b/b2/console_tool.py index b1d5041ab..c143f8792 100644 --- a/b2/console_tool.py +++ b/b2/console_tool.py @@ -517,11 +517,11 @@ class CreateKey(Command): The capabilities are passed in as a comma-separated list, like "readFiles,writeFiles". - The 'validDurationSeconds' is the length of time the new application key will exist. + The 'duration' is the length of time the new application key will exist. When the time expires the key will disappear and will no longer be usable. If not specified, the key will not expire. - The 'bucketName' is the name of a bucket in the account. When specified, the key + The 'bucket' is the name of a bucket in the account. When specified, the key will only allow access to that bucket. The 'namePrefix' restricts file access to files whose names start with the prefix. @@ -899,13 +899,14 @@ class ListKeys(Command): Lists the application keys for the current account. The columns in the output are: - - ID of the application key - - Name of the application key - - Name of the bucket the key is restricted to, or '-' for no restriction - - Date of expiration, or '-' - - Time of expiration, or '-' - - File name prefix, in single quotes - - Command-separated list of capabilities + + - ID of the application key + - Name of the application key + - Name of the bucket the key is restricted to, or '-' for no restriction + - Date of expiration, or '-' + - Time of expiration, or '-' + - File name prefix, in single quotes + - Command-separated list of capabilities None of the values contain whitespace. @@ -1135,6 +1136,16 @@ class Sync(Command): Copies multiple files from source to destination. Optionally deletes or hides destination files that the source does not have. + The synchronizer can copy files: + + - From a B2 bucket to a local destination. + - From a local source to a B2 bucket. + - From one B2 bucket to another. + - Between different folders in the same B2 bucket. + It will sync only the latest versions of files. + + Use "b2:///" for B2 paths, e.g. "b2://my-bucket-name/a/path/prefix/". + Progress is displayed on the console unless '--noProgress' is specified. A list of actions taken is always printed. @@ -1216,10 +1227,6 @@ class Sync(Command): not be synced. Specifying --verbose and --dryRun can be useful to determine comparison value differences. - One of the paths must be a local file path, and the other must be - a B2 bucket path. Use "b2:///" for B2 paths, e.g. - "b2://my-bucket-name/a/path/prefix/". - When a destination file is present that is not in the source, the default is to leave it there. Specifying --delete means to delete destination files that are not in the source. @@ -1238,6 +1245,8 @@ class Sync(Command): To make the destination exactly match the source, use: {NAME} sync --delete --replaceNewer ... ... + NOTE: It might not be exact match if the source contains hidden files. + If the source file is hidden, the file on the destination won't be deleted even with --delete. WARNING: Using '--delete' deletes files! We recommend not using it. If you use --keepDays instead, you will have some time to recover your From 5a76e291ca123f5767512f59580139454c55f1f2 Mon Sep 17 00:00:00 2001 From: Maciej Lech Date: Wed, 28 Oct 2020 08:44:51 +0100 Subject: [PATCH 2/3] Update the changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b588a1d9a..ea819d3f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added * Add support for Python 3.9 +### Changed +* Update `b2 sync` usage text for bucket-to-bucket sync + ### Removed * Drop Python 2 support :tada: (for old systems you can now use the [binary distribution](https://www.backblaze.com/b2/docs/quick_command_line.html)) * Remove `--prefix` from `ls` (it didn't really work, use `folderName` argument) From 0e3f0ffb4eb0fc77b7f5c4617afbaebc1aa4f60e Mon Sep 17 00:00:00 2001 From: Maciej Lech Date: Wed, 28 Oct 2020 14:51:30 +0100 Subject: [PATCH 3/3] Update after PR --- CHANGELOG.md | 3 +++ b2/console_tool.py | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea819d3f7..d3caeac06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Remove `--prefix` from `ls` (it didn't really work, use `folderName` argument) * Clean up legacy code (`CliBucket`, etc.) +### Fixed +* Correct names of the arguments in `b2 create-key` usage text + ## [2.0.2] - 2020-07-15 ### Added diff --git a/b2/console_tool.py b/b2/console_tool.py index c143f8792..73d8597ab 100644 --- a/b2/console_tool.py +++ b/b2/console_tool.py @@ -1142,7 +1142,6 @@ class Sync(Command): - From a local source to a B2 bucket. - From one B2 bucket to another. - Between different folders in the same B2 bucket. - It will sync only the latest versions of files. Use "b2:///" for B2 paths, e.g. "b2://my-bucket-name/a/path/prefix/". @@ -1245,8 +1244,6 @@ class Sync(Command): To make the destination exactly match the source, use: {NAME} sync --delete --replaceNewer ... ... - NOTE: It might not be exact match if the source contains hidden files. - If the source file is hidden, the file on the destination won't be deleted even with --delete. WARNING: Using '--delete' deletes files! We recommend not using it. If you use --keepDays instead, you will have some time to recover your