b2-tools: add page (#13355)

Co-authored-by: oneincontrol <nikoloskid@protonmail.com>
Co-authored-by: spageektti <git@spageektti.cc>
pull/28/head
Daniel Nikoloski 2024-08-06 22:30:10 +02:00 committed by GitHub
parent c98b67b2ec
commit 17c9ad983b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 36 additions and 0 deletions

36
pages/common/b2-tools.md Normal file
View File

@ -0,0 +1,36 @@
# b2-tools
> Access all features of Backblaze B2 Cloud Storage easily.
> More information: <https://www.backblaze.com/docs/cloud-storage-command-line-tools>.
- Access your account:
`b2 authorize_account {{key_id}}`
- List the existing buckets in your account:
`b2 list_buckets`
- Create a bucket, provide the bucket name, and access type (e.g. allPublic or allPrivate):
`b2 create_bucket {{bucket_name}} {{allPublic|allPrivate}}`
- Upload a file. Choose a file, bucket, and a folder:
`b2 upload_file {{bucket_name}} {{path/to/file}} {{folder_name}}`
- Upload a source directory to a Backblaze B2 bucket destination:
`b2 sync {{path/to/source_file}} {{bucket_name}}`
- Copy a file from one bucket to another bucket:
`b2 copy-file-by-id {{path/to/source_file_id}} {{destination_bucket_name}} {{path/to/b2_file}}`
- Show the files in your bucket:
`b2 ls {{bucket_name}}`
- Remove a "folder" or a set of files matching a pattern:
`b2 rm {{path/to/folder|pattern}}`