Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the docs #667

Merged
merged 4 commits into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
mlech-reef marked this conversation as resolved.
Show resolved Hide resolved

### 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)
Expand Down
35 changes: 22 additions & 13 deletions b2/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
mlech-reef marked this conversation as resolved.
Show resolved Hide resolved
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.
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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.
mlech-reef marked this conversation as resolved.
Show resolved Hide resolved

Use "b2://<bucketName>/<prefix>" 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.

Expand Down Expand Up @@ -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://<bucketName>/<prefix>" 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.
Expand All @@ -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.
mlech-reef marked this conversation as resolved.
Show resolved Hide resolved

WARNING: Using '--delete' deletes files! We recommend not using it.
If you use --keepDays instead, you will have some time to recover your
Expand Down