Skip to content

Commit 401772b

Browse files
committed
b2: document example + point to temporary fork
- Add documentation in storage-examples for using Perkeep with b2 as a storage backend. The documentation uses the new API terminology: AccountID is no longer a thing in the Backblaze web console. - Temporarily replace FiloSottile/b2 by aviau/b2 where I host a copy of clgillis's Pull Request[1]. We can point to the original project again as soon as it is merged. Note that I haven't updated the vendor directory and it seems that `go mod vendor` updates way more things that are also outdated in the master branch, so I will leave that as an exercise to whoever has commit access :). Before this Pull Request, launching the b2 storage would error with the following error message: ``` Error parsing config: Caught panic: error instantiating storage for prefix "/sto-b2/", type "b2": Post "https://api000.backblazeb2.com/b2api/v1/b2_list_buckets": b2 remote error [bad_request]: accountId invalid ``` Now, it seems to work as expected! 1. FiloSottile/b2#8
1 parent 4b2ae52 commit 401772b

3 files changed

Lines changed: 36 additions & 8 deletions

File tree

doc/storage-examples.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
To use S3 with Perkeep, you need to:
88

9-
* Sign up for an Amazon Web Services account
10-
* Sign into the AWS console, navigate to 'S3'
11-
* Create an S3 bucket for your Perkeep backups (Perkeep will not work if you put other files in this bucket)
12-
* Configure your Perkeep server to sync blobs to the S3 bucket
9+
* Sign up for an Amazon Web Services account.
10+
* Sign into the AWS console, navigate to 'S3'.
11+
* Create an S3 bucket for your Perkeep backups (Perkeep will not work if you put other files in this bucket).
12+
* Configure your Perkeep server to sync blobs to the S3 bucket.
1313

1414
It is advisable to use a dedicated key/secret for Perkeep:
1515

16-
* Sign into the AWS console, navigate to 'Identity & Access Management' and click 'Users'
17-
* Click 'Create new users' and create a user for Perkeep (keep 'Generate an access key' checked)
16+
* Sign into the AWS console, navigate to 'Identity & Access Management' and click 'Users'.
17+
* Click 'Create new users' and create a user for Perkeep (keep 'Generate an access key' checked).
1818
* Click 'Show User Security Credentials' to get the users Access key and Secret key - these will be required to configure Perkeep and can't be obtained after you leave this screen.
19-
* Go back to the user list and select the new user, and on the 'permissions' tab add the following 'inline policy' (replacing YOUR_BUCKET_NAME with the name of the bucket you created)
19+
* Go back to the user list and select the new user, and on the 'permissions' tab add the following 'inline policy' (replacing YOUR_BUCKET_NAME with the name of the bucket you created):
2020

2121
```
2222
{
@@ -42,5 +42,29 @@ It is advisable to use a dedicated key/secret for Perkeep:
4242

4343
Finally, add the s3 config line to your Perkeep `server-config.json`:
4444
```
45-
s3: "ACCESS_KEY:SECRET_KEY:YOUR_BUCKET_NAME"
45+
"s3": "ACCESS_KEY:SECRET_KEY:YOUR_BUCKET_NAME"
46+
```
47+
48+
## B2
49+
50+
[Backblaze B2](https://www.backblaze.com/b2/cloud-storage.html) is simple, reliable, affordable object storage.
51+
52+
To use b2 with Perkep, you need to:
53+
* Sign up for a Backblaze account.
54+
* Sign in to the Backblaze console, navigate to 'Buckets'.
55+
* Create a bucket for your Perkeep backups (Perkeep will not work if you put other files on this bucket).
56+
* Configure your perkeep server to sync blobs to the Backblaze bucket.
57+
58+
It is advisable to create a dedicated Application Key for Perkeep:
59+
60+
* Sign in to the Backblaze console, navigate to 'App Keys'.
61+
* Click 'Add a New Application Key'.
62+
* Give it a name, for example 'perkeep'.
63+
* Allow access to the bucket that you just created.
64+
* Choose 'Read and Write'.
65+
* Click 'Create New Key'.
66+
67+
Finally, add the b2 config line to your perkeep `server-config.json`:
68+
```
69+
"b2": "keyID:applicationKey:bucket"
4670
```

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@ require (
7171
)
7272

7373
replace google.golang.org/grpc v1.14.0 => github.com/bradfitz/grpc-go v0.0.0-20170203184515-188a132adcfba339f1f2d5da52498451341f9ee8
74+
75+
replace github.com/FiloSottile/b2 => github.com/aviau/b2 v0.0.0-20180913003434-1ae8d9b78db9

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ github.com/FiloSottile/b2 v0.0.0-20170207175032-b197f7a2c317 h1:1GuMjC4tjfwnWBdo
99
github.com/FiloSottile/b2 v0.0.0-20170207175032-b197f7a2c317/go.mod h1:3DBotXAz3n/g1px/orhrK7xBJLjfaJRRrsEAJiUYEtY=
1010
github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg=
1111
github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
12+
github.com/aviau/b2 v0.0.0-20180913003434-1ae8d9b78db9 h1:qPlc4QTdYURXX4FHRpfJvbTvak1JzstfgJXdcB1nkCk=
13+
github.com/aviau/b2 v0.0.0-20180913003434-1ae8d9b78db9/go.mod h1:8dNRU5RV/wbLtEayj1Ayzi0zd2oxXlaneOBTD9rWYkw=
1214
github.com/aws/aws-sdk-go v1.14.31 h1:amhorvKh1zNxo9YCntvA5uDmgw+pCYXOp4xO8WS1oDg=
1315
github.com/aws/aws-sdk-go v1.14.31/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
1416
github.com/bradfitz/latlong v0.0.0-20140711231157-b74550508561 h1:mz4equOOUOnI4q5E7dyHlRx1x63YEaYwhlVluCDila4=

0 commit comments

Comments
 (0)