Backblaze s312/15/2023 ![]() The ls command gains the -withWildcard option. Stylesheets/style.css New -withWildcard option for the ls command % b2 rm -dryRun -versions –recursive my-bucket We strongly recommend you use -dryRun first, to check that you will be deleting the correct files. % b2 rm -dryRun -versions -withWildcard -recursive my-bucket 'images/*.png'ĭANGER ZONE: by omitting -withWildcard and the folderName argument, you can delete all of the files in a bucket. Note the use of quotes to avoid the command shell expanding the wildcard: Here it is with the ‘*’ wildcard to apply the command to all versions of the. Note: there is no leading ‘/’ in Backblaze B2 file names.Īs mentioned above, the -dryRun argument allows you to see what files would be deleted, without actually deleting them. There are no wildcard characters in the pattern, so the file name must match exactly. images/san-mateo.png: the file to be deleted.-withWildcard: treat the folderName argument as a pattern to match the file name.Omitting this option applies the command to just the most recent version. -versions: apply the command to all versions.%: represents the command shell’s prompt.% b2 rm -versions -withWildcard -recursive my-bucket images/san-mateo.png The new rm command is significantly more powerful, allowing you to delete all versions of a file in a single command: The CLI has always included the low-level delete-file-version command (to delete a single file version) but you had to call that multiple times and combine it with other commands to remove all versions of a file, or to remove all files with a given prefix. The most significant addition in 3.7.0 is a whole new command: rm. Major Changes in B2 Command Line Tool Version 3.7.0 New rm command Let’s take a look at what’s new in the latest release of the Backblaze B2 CLI. You can find a complete list of the CLI’s commands and their options in the documentation. % b2 rm -dryRun -withWildcard -recursive my-bucket 'audio/*.wav' If you want to be sure you’re deleting the correct files, you can add the -dryRun option to show the files that would be deleted, rather than actually deleting them: % b2 rm -withWildcard -recursive my-bucket 'audio/*.wav' However, the CLI can do this in a single command: You can do this in a GUI tool, opening the bucket, navigating to the correct location, sorting the files by extension, selecting all of the. mp3 files, you decide that you can delete the. Once the transcoding is complete, and you’ve reviewed a sample of the. Imagine you’ve uploaded a large number of WAV files to a Backblaze B2 Bucket for transcoding into. If you’re already familiar with CLI tools, feel free to skip to the next section. Automating Common Tasks with the B2 Command Line Tool This is very tiresome if you’re working interactively at the command line! In contrast, the B2 CLI retrieves the correct endpoint from Backblaze B2 when it authenticates, so the command line is much more concise:Īdditionally, the CLI provides fine-grain access to Backblaze B2-specific functionality, such as application key management and replication. ![]() The AWS CLI allows you to set your access key id and secret access key via either environment variables or a configuration file, but you must override the default endpoint on the command line with every command, like this: While the AWS CLI works perfectly well with Backblaze B2, and we explain how to use it in our B2 Developer Quick-Start Guide, it’s slightly clunky. In most cases, we recommend using the S3-compatible API, since a rich ecosystem of S3 tools and knowledge has evolved over the years. AWSĪs you almost certainly already know, Backblaze B2 has an S3-compatible API in addition to its original API, now known as the B2 Native API. MikroTik CRS510-8XS-2XQ-IN 25GbE and 100GbE Switch Announcedīattle of the CLI’s: Backblaze B2 vs.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |