Go to file
Urko aca76c1d38 add license 2023-07-10 13:43:10 +02:00
cmd feat: tune up backblaze script 2023-07-10 12:19:21 +02:00
internal/services feat: backblaze service 2023-07-10 11:59:37 +02:00
.gitignore feat init project 2023-07-10 11:34:19 +02:00
License add license 2023-07-10 13:43:10 +02:00
Makefile fix makefile 2023-07-10 12:57:38 +02:00
Readme.md feat: update makefile and readme 2023-07-10 12:43:51 +02:00
go.mod feat: tune up backblaze script 2023-07-10 12:19:21 +02:00
go.sum feat: tune up backblaze script 2023-07-10 12:19:21 +02:00

Readme.md

Backblaze Backup Tool

This is a tool to backup files and directories to Backblaze.

Prerequisites

  • Go 1.16 or higher
  • Backblaze account with a bucket created
  • Environment variables BB_ID and BB_KEY set with your Backblaze account ID and application key respectively

Building the Application

You can build the application using the provided Makefile.

On Linux:

make rebuild

On Windows:

You will need to have make installed. If you don't have it, you can install it through Chocolatey:

choco install make

Then you can run the same command as on Linux:

make rebuild

This will create a binary in the bin directory.

Running the Application

You can run the application directly from the command line. Here's how to do it:

./bin/backblaze-backup --bucket "your-bucket-name" --dir "/path/to/directory"

Or if you want to upload a single file:

./bin/backblaze-backup --bucket "your-bucket-name" --file "/path/to/file"

You can also use the local_run command in the Makefile to run the application with a test directory and bucket:

make local_run DIR="/home/user/test-upload" BUCKET="my-test-bucket"

This will run the application with the directory /home/user/test-upload and the bucket my-test-bucket.

Flags

--bucket: The name of your Backblaze bucket
--dir: The absolute path of the directory you want to upload to Backblaze
--file: The absolute path of the file you want to upload to Backblaze

Note: You must select just one option, dir or file.

Please replace "your-bucket-name", "/path/to/directory", and "/path/to/file" with your actual bucket name and paths.