Download a snapshot from Backblaze with curl

34 Views Asked by At

I'd like to download a lot of small files compressed into a snapshot from Backblaze B2 to a remote server with curl or wget.

The download URL is only accessible if you are signed in, and accessing the snapshot with s3 is also not possible for some reason.

1

There are 1 best solutions below

0
DaWe On

If you can not login to Backblaze on your remote machine, you can still make a request to the download URL with the same authentication headers you have on your personal computer. In this example we'll copy the whole download request as a cURL command from the Chrome inspector:

  1. Log in to Backblaze in your browser, and head to the Snapshots page.

  2. Open the inspector (F12) and go to the "network" tab.

  3. Start downloading the file (you can cancel it immediately)

  4. There will be a new request in the inspector to a file user_b2_download_file. Right click on that request, open the Copy sub-menu and click "Copy as cURL".

enter image description here

  1. You need to specify the output filename in the copied cURL request. Just change

    curl ...

    to

    curl -o output.zip ...

    and then you can run the command in the terminal.