Skip to content

Instantly share code, notes, and snippets.

@DaWe35
Created March 4, 2024 04:10
Show Gist options
  • Save DaWe35/960c725161c2725155123550d357c0a4 to your computer and use it in GitHub Desktop.
Save DaWe35/960c725161c2725155123550d357c0a4 to your computer and use it in GitHub Desktop.

Download Backblaze snapshot to remote with cURL cli.

Since the download URL is only accessible if you are signed in, and accessing the snapshot with s3 is also not possible for some reason, your only option is to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment