Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: offen/docker-volume-backup
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.43.1
Choose a base ref
...
head repository: offen/docker-volume-backup
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jan 9, 2025

  1. Copy the full SHA
    3063288 View commit details

Commits on Jan 14, 2025

  1. Copy the full SHA
    8d26194 View commit details

Commits on Jan 21, 2025

  1. Copy the full SHA
    857e4fc View commit details
  2. Copy the full SHA
    68b7e4d View commit details

Commits on Jan 23, 2025

  1. Copy the full SHA
    9585853 View commit details

Commits on Jan 28, 2025

  1. Copy the full SHA
    7340e00 View commit details
  2. Copy the full SHA
    e628f09 View commit details

Commits on Feb 4, 2025

  1. Copy the full SHA
    40b12b9 View commit details
  2. Copy the full SHA
    2375607 View commit details

Commits on Feb 6, 2025

  1. Copy the full SHA
    2652e05 View commit details

Commits on Feb 7, 2025

  1. Support passing standard ssh keys to age encryption (#530)

    * Support passing standard ssh keys to age encryption
    
    * Cover SSH keys in age test case
    m90 authored Feb 7, 2025
    Copy the full SHA
    cbbaa6b View commit details

Commits on Feb 11, 2025

  1. Copy the full SHA
    00cf059 View commit details
  2. Copy the full SHA
    7e6ed75 View commit details
  3. Copy the full SHA
    56f325a View commit details

Commits on Feb 17, 2025

  1. Copy the full SHA
    75f94b0 View commit details
  2. Copy the full SHA
    8f0a1c9 View commit details

Commits on Feb 22, 2025

  1. Bump golang from 1.23-alpine to 1.24-alpine (#537)

    * Bump golang from 1.23-alpine to 1.24-alpine
    
    Bumps golang from 1.23-alpine to 1.24-alpine.
    
    ---
    updated-dependencies:
    - dependency-name: golang
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * Also update CI and go.mod
    
    * Old version of golangci-lint does not match Go version
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Frederik Ring <frederik.ring@gmail.com>
    dependabot[bot] and m90 authored Feb 22, 2025
    Copy the full SHA
    41d518a View commit details

Commits on Feb 25, 2025

  1. Copy the full SHA
    22a4346 View commit details
  2. Copy the full SHA
    c48ac28 View commit details
  3. Copy the full SHA
    fcdaa09 View commit details
  4. Copy the full SHA
    2884d89 View commit details

Commits on Feb 26, 2025

  1. Copy the full SHA
    bad2d98 View commit details

Commits on Feb 27, 2025

  1. Copy the full SHA
    d8ac5ae View commit details
  2. Paths are joined with client side separators when targeting remotes (#…

    …547)
    
    Currently, filepath.Join is used to join path fragments that are supposed
    to be created on remote storage backends. This could theoretically cause
    problems when the separators used by the client and the remotes do not match.
    It's unlikely this causes problems right now, but it's definitely better to
    rectify it before it causes further confusion.
    
    This was raised in #541
    m90 authored Feb 27, 2025
    Copy the full SHA
    eb4099d View commit details
Showing with 141 additions and 106 deletions.
  1. +0 −3 .github/FUNDING.yml
  2. +2 −2 .github/workflows/deploy-docs.yml
  3. +2 −2 .github/workflows/golangci-lint.yml
  4. +1 −1 .github/workflows/unit.yml
  5. +1 −1 Dockerfile
  6. +1 −1 README.md
  7. +15 −1 cmd/backup/encrypt_archive.go
  8. +4 −0 docs/how-tos/encrypt-backups.md
  9. +1 −1 docs/how-tos/handle-file-uploads-using-third-party-tools.md
  10. +1 −1 docs/recipes/index.md
  11. +13 −0 docs/reference/index.md
  12. +17 −15 go.mod
  13. +40 −36 go.sum
  14. +3 −2 internal/storage/azure/azure.go
  15. +2 −3 internal/storage/dropbox/dropbox.go
  16. +2 −3 internal/storage/s3/s3.go
  17. +2 −3 internal/storage/ssh/ssh.go
  18. +2 −3 internal/storage/webdav/webdav.go
  19. +1 −1 test/age-passphrase/docker-compose.yml
  20. +1 −1 test/age-publickey/docker-compose.yml
  21. +5 −1 test/age-publickey/run.sh
  22. +1 −1 test/azure/docker-compose.yml
  23. +1 −1 test/certs/docker-compose.yml
  24. +1 −1 test/cli/run.sh
  25. +1 −1 test/collision/docker-compose.yml
  26. +1 −1 test/commands/docker-compose.yml
  27. +1 −1 test/confd/docker-compose.yml
  28. +1 −1 test/dropbox/docker-compose.yml
  29. +1 −1 test/extend/docker-compose.yml
  30. +1 −1 test/gpg-asym/docker-compose.yml
  31. +1 −1 test/gpg/docker-compose.yml
  32. +1 −1 test/local/docker-compose.yml
  33. +1 −1 test/lock/docker-compose.yml
  34. +1 −1 test/pgzip/run.sh
  35. +1 −1 test/proxy/docker-compose.swarm.yml
  36. +1 −1 test/proxy/docker-compose.yml
  37. +1 −1 test/pruning/docker-compose.yml
  38. +1 −1 test/s3/docker-compose.yml
  39. +1 −1 test/secrets/docker-compose.yml
  40. +1 −1 test/services/docker-compose.yml
  41. +1 −1 test/ssh/docker-compose.yml
  42. +1 −1 test/swarm/docker-compose.yml
  43. +1 −1 test/tar/docker-compose.yml
  44. +1 −1 test/user/docker-compose.yml
  45. +1 −1 test/webdav/docker-compose.yml
  46. +1 −1 test/zstd/run.sh
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ jobs:
env:
JEKYLL_ENV: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/_site/'

@@ -52,4 +52,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -18,15 +18,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: '1.24'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.60
version: v1.64

# Optional: working directory, useful for monorepos
# working-directory: somedir
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23.x'
go-version: '1.24.x'
- name: Install dependencies
run: go mod download
- name: Test with the Go CLI
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2022 - offen.software <hioffen@posteo.de>
# SPDX-License-Identifier: MPL-2.0

FROM golang:1.23-alpine as builder
FROM golang:1.24-alpine AS builder

WORKDIR /app
COPY . .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ docker run --rm \
offen/docker-volume-backup:v2
```

Alternatively, pass a `--env-file` in order to use a full config as described below.
Alternatively, pass a `--env-file` in order to use a full config as described [in the docs](https://offen.github.io/docker-volume-backup/reference/).

---

16 changes: 15 additions & 1 deletion cmd/backup/encrypt_archive.go
Original file line number Diff line number Diff line change
@@ -10,8 +10,10 @@ import (
"io"
"os"
"path"
"strings"

"filippo.io/age"
"filippo.io/age/agessh"
"github.com/ProtonMail/go-crypto/openpgp/armor"
openpgp "github.com/ProtonMail/go-crypto/openpgp/v2"
"github.com/offen/docker-volume-backup/internal/errwrap"
@@ -73,7 +75,7 @@ func (s *script) getConfiguredAgeRecipients() ([]age.Recipient, error) {
recipients := []age.Recipient{}
if len(s.c.AgePublicKeys) > 0 {
for _, pk := range s.c.AgePublicKeys {
pkr, err := age.ParseX25519Recipient(pk)
pkr, err := parseAgeRecipient(pk)
if err != nil {
return nil, errwrap.Wrap(err, "failed to parse age public key")
}
@@ -94,6 +96,18 @@ func (s *script) getConfiguredAgeRecipients() ([]age.Recipient, error) {
return recipients, nil
}

func parseAgeRecipient(arg string) (age.Recipient, error) {
// This logic is adapted from what the age CLI is doing
// stripping some special cases
switch {
case strings.HasPrefix(arg, "age1"):
return age.ParseX25519Recipient(arg)
case strings.HasPrefix(arg, "ssh-"):
return agessh.ParseRecipient(arg)
}
return nil, fmt.Errorf("unknown recipient type: %q", arg)
}

func (s *script) encryptWithAge(rec []age.Recipient) error {
return s.doEncrypt("age", func(ciphertextWriter io.Writer) (io.WriteCloser, error) {
return age.Encrypt(ciphertextWriter, rec...)
4 changes: 4 additions & 0 deletions docs/how-tos/encrypt-backups.md
Original file line number Diff line number Diff line change
@@ -21,6 +21,10 @@ gpg -o backup.tar.gz -d backup.tar.gz.gpg

## Using age encryption

{: .note }
Even though the `age` CLI tools supports encryption using SSH keys, this is not supported by this tool.
`AGE_PUBLIC_KEYS` currently expects `age` keys to be given.

age allows backups to be encrypted with either a symmetric key (password) or a public key. One of those options are available for use.

Given `AGE_PASSPHRASE` being provided, the backup archive will be encrypted with the passphrase and saved as a `.age` file instead. Refer to age documentation for how to properly decrypt.
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ services:
- docker-volume-backup.copy-post=/bin/sh -c 'rsync $$COMMAND_RUNTIME_ARCHIVE_FILEPATH /destination'
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

# other services defined here ...
volumes:
2 changes: 1 addition & 1 deletion docs/recipes/index.md
Original file line number Diff line number Diff line change
@@ -358,7 +358,7 @@ services:
volumes:
- ./local:/archive
- data:/backup/data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
data:
13 changes: 13 additions & 0 deletions docs/reference/index.md
Original file line number Diff line number Diff line change
@@ -337,6 +337,9 @@ You can populate below template according to your requirements and use it as you
########### BACKUP ENCRYPTION
# All of the encryption options are mutually exclusive. Provide a single option
# for the encryption scheme of your choice.
# Backups can be encrypted symmetrically using gpg in case a passphrase is given.
# GPG_PASSPHRASE="<xxx>"
@@ -350,6 +353,16 @@ You can populate below template according to your requirements and use it as you
#...
#-----END PGP PUBLIC KEY BLOCK-----
# Backups can be encrypted symmetrically using age in case a passphrase is given.
# AGE_PASSPHRASE="<xxx>"
# Backups can be encrypted asymmetrically using age in case publickeys are given.
# Multiple keys need to be provided as a comma separated list. Right now, this
# supports `age` and `ssh` keys
# AGE_PUBLIC_KEYS="<xxx>"
########### STOPPING CONTAINERS AND SERVICES DURING BACKUP
# Containers or services can be stopped by applying a
32 changes: 17 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
module github.com/offen/docker-volume-backup

go 1.23
go 1.24

require (
filippo.io/age v1.2.1
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.5.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0
github.com/containrrr/shoutrrr v0.8.0
github.com/cosiner/argv v0.1.0
github.com/docker/cli v27.4.1+incompatible
github.com/docker/cli v28.0.0+incompatible
github.com/docker/docker v27.1.1+incompatible
github.com/gofrs/flock v0.12.1
github.com/joho/godotenv v1.5.1
github.com/klauspost/compress v1.17.11
github.com/klauspost/compress v1.18.0
github.com/leekchan/timeutil v0.0.0-20150802142658-28917288c48d
github.com/minio/minio-go/v7 v7.0.83
github.com/minio/minio-go/v7 v7.0.87
github.com/offen/envconfig v1.5.0
github.com/otiai10/copy v1.14.1
github.com/pkg/sftp v1.13.7
github.com/robfig/cron/v3 v3.0.1
github.com/studio-b12/gowebdav v0.10.0
golang.org/x/crypto v0.32.0
golang.org/x/oauth2 v0.25.0
golang.org/x/sync v0.10.0
golang.org/x/crypto v0.33.0
golang.org/x/oauth2 v0.27.0
golang.org/x/sync v0.11.0
mvdan.cc/sh/v3 v3.10.0
)

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/log v0.1.0 // indirect
@@ -35,9 +36,10 @@ require (
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/go-json v0.10.4 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/minio/crc64nvme v1.0.1 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/otiai10/mint v1.6.3 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect
@@ -52,9 +54,9 @@ require (
)

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.1
github.com/docker/go-connections v0.4.0 // indirect
@@ -79,8 +81,8 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
gotest.tools/v3 v3.0.3 // indirect
)
76 changes: 40 additions & 36 deletions go.sum

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions internal/storage/azure/azure.go
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import (
"errors"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"sync"
@@ -128,7 +129,7 @@ func (b *azureBlobStorage) Copy(file string) error {
_, err = b.client.UploadStream(
context.Background(),
b.containerName,
filepath.Join(b.DestinationPath, filepath.Base(file)),
path.Join(b.DestinationPath, filepath.Base(file)),
fileReader,
b.uploadStreamOptions,
)
@@ -141,7 +142,7 @@ func (b *azureBlobStorage) Copy(file string) error {
// Prune rotates away backups according to the configuration and provided
// deadline for the Azure Blob storage backend.
func (b *azureBlobStorage) Prune(deadline time.Time, pruningPrefix string) (*storage.PruneStats, error) {
lookupPrefix := filepath.Join(b.DestinationPath, pruningPrefix)
lookupPrefix := path.Join(b.DestinationPath, pruningPrefix)
pager := b.client.NewListBlobsFlatPager(b.containerName, &container.ListBlobsFlatOptions{
Prefix: &lookupPrefix,
})
5 changes: 2 additions & 3 deletions internal/storage/dropbox/dropbox.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ import (
"net/url"
"os"
"path"
"path/filepath"
"strings"
"sync"
"time"
@@ -195,7 +194,7 @@ loop:
_, err = b.client.UploadSessionFinish(
files.NewUploadSessionFinishArg(
files.NewUploadSessionCursor(sessionId, 0),
files.NewCommitInfo(filepath.Join(b.DestinationPath, name)),
files.NewCommitInfo(path.Join(b.DestinationPath, name)),
), nil)
if err != nil {
return errwrap.Wrap(err, "error finishing the upload session")
@@ -247,7 +246,7 @@ func (b *dropboxStorage) Prune(deadline time.Time, pruningPrefix string) (*stora

pruneErr := b.DoPrune(b.Name(), len(matches), lenCandidates, deadline, func() error {
for _, match := range matches {
if _, err := b.client.DeleteV2(files.NewDeleteArg(filepath.Join(b.DestinationPath, match.Name))); err != nil {
if _, err := b.client.DeleteV2(files.NewDeleteArg(path.Join(b.DestinationPath, match.Name))); err != nil {
return errwrap.Wrap(err, "error removing file from Dropbox storage")
}
}
5 changes: 2 additions & 3 deletions internal/storage/s3/s3.go
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ import (
"fmt"
"os"
"path"
"path/filepath"
"time"

"github.com/minio/minio-go/v7"
@@ -124,7 +123,7 @@ func (b *s3Storage) Copy(file string) error {
putObjectOptions.PartSize = uint64(partSize)
}

if _, err := b.client.FPutObject(context.Background(), b.bucket, filepath.Join(b.DestinationPath, name), file, putObjectOptions); err != nil {
if _, err := b.client.FPutObject(context.Background(), b.bucket, path.Join(b.DestinationPath, name), file, putObjectOptions); err != nil {
if errResp := minio.ToErrorResponse(err); errResp.Message != "" {
return errwrap.Wrap(
nil,
@@ -147,7 +146,7 @@ func (b *s3Storage) Copy(file string) error {
// Prune rotates away backups according to the configuration and provided deadline for the S3/Minio storage backend.
func (b *s3Storage) Prune(deadline time.Time, pruningPrefix string) (*storage.PruneStats, error) {
candidates := b.client.ListObjects(context.Background(), b.bucket, minio.ListObjectsOptions{
Prefix: filepath.Join(b.DestinationPath, pruningPrefix),
Prefix: path.Join(b.DestinationPath, pruningPrefix),
Recursive: true,
})

5 changes: 2 additions & 3 deletions internal/storage/ssh/ssh.go
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ import (
"io"
"os"
"path"
"path/filepath"
"strings"
"time"

@@ -115,7 +114,7 @@ func (b *sshStorage) Copy(file string) error {
}
defer source.Close()

destination, err := b.sftpClient.Create(filepath.Join(b.DestinationPath, name))
destination, err := b.sftpClient.Create(path.Join(b.DestinationPath, name))
if err != nil {
return errwrap.Wrap(err, "error creating file")
}
@@ -180,7 +179,7 @@ func (b *sshStorage) Prune(deadline time.Time, pruningPrefix string) (*storage.P

pruneErr := b.DoPrune(b.Name(), len(matches), len(candidates), deadline, func() error {
for _, match := range matches {
if err := b.sftpClient.Remove(filepath.Join(b.DestinationPath, match)); err != nil {
if err := b.sftpClient.Remove(path.Join(b.DestinationPath, match)); err != nil {
return errwrap.Wrap(err, "error removing file")
}
}
5 changes: 2 additions & 3 deletions internal/storage/webdav/webdav.go
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@ import (
"net/http"
"os"
"path"
"path/filepath"
"strings"
"time"

@@ -77,7 +76,7 @@ func (b *webDavStorage) Copy(file string) error {
return errwrap.Wrap(err, "error opening the file to be uploaded")
}

if err := b.client.WriteStream(filepath.Join(b.DestinationPath, name), r, 0644); err != nil {
if err := b.client.WriteStream(path.Join(b.DestinationPath, name), r, 0644); err != nil {
return errwrap.Wrap(err, "error uploading the file")
}
b.Log(storage.LogLevelInfo, b.Name(), "Uploaded a copy of backup '%s' to '%s' at path '%s'.", file, b.url, b.DestinationPath)
@@ -110,7 +109,7 @@ func (b *webDavStorage) Prune(deadline time.Time, pruningPrefix string) (*storag

pruneErr := b.DoPrune(b.Name(), len(matches), lenCandidates, deadline, func() error {
for _, match := range matches {
if err := b.client.Remove(filepath.Join(b.DestinationPath, match.Name())); err != nil {
if err := b.client.Remove(path.Join(b.DestinationPath, match.Name())); err != nil {
return errwrap.Wrap(err, "error removing file")
}
}
2 changes: 1 addition & 1 deletion test/age-passphrase/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ services:
volumes:
- ${LOCAL_DIR:-./local}:/archive
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/age-publickey/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ services:
volumes:
- ${LOCAL_DIR:-./local}:/archive
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
6 changes: 5 additions & 1 deletion test/age-publickey/run.sh
Original file line number Diff line number Diff line change
@@ -13,7 +13,10 @@ PK_A="$(grep -E 'public key' <"$LOCAL_DIR/pk-a.txt" | cut -d: -f2 | xargs)"
age-keygen >"$LOCAL_DIR/pk-b.txt"
PK_B="$(grep -E 'public key' <"$LOCAL_DIR/pk-b.txt" | cut -d: -f2 | xargs)"

export BACKUP_AGE_PUBLIC_KEYS="$PK_A,$PK_B"
ssh-keygen -t ed25519 -m pem -f "$LOCAL_DIR/id_ed25519" -C "docker-volume-backup@local"
PK_C="$(cat $LOCAL_DIR/id_ed25519.pub)"

export BACKUP_AGE_PUBLIC_KEYS="$PK_A,$PK_B,$PK_C"

docker compose up -d --quiet-pull
sleep 5
@@ -41,3 +44,4 @@ do_decrypt() {

do_decrypt "$LOCAL_DIR/pk-a.txt"
do_decrypt "$LOCAL_DIR/pk-b.txt"
do_decrypt "$LOCAL_DIR/id_ed25519"
2 changes: 1 addition & 1 deletion test/azure/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ services:
BACKUP_PRUNING_PREFIX: test
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/certs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ services:
BACKUP_PRUNING_LEEWAY: 5s
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${CERT_DIR:-.}/rootCA.crt:/root/minio-rootCA.crt

offen:
2 changes: 1 addition & 1 deletion test/cli/run.sh
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ docker run --rm -q \
--network test_network \
-v app_data:/backup/app_data \
-v empty_data:/backup/empty_data \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--env AWS_ACCESS_KEY_ID=test \
--env AWS_SECRET_ACCESS_KEY=GMusLtUmILge2by+z890kQ \
--env AWS_ENDPOINT=minio:9000 \
2 changes: 1 addition & 1 deletion test/collision/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ services:
volumes:
- offen_data:/backup/offen_data:ro
- ${LOCAL_DIR:-./local}:/archive
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/commands/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ services:
volumes:
- ${LOCAL_DIR:-./local}:/archive
- app_data:/backup/data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
app_data:
2 changes: 1 addition & 1 deletion test/confd/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ services:
- ./01backup.env:/etc/dockervolumebackup/conf.d/01backup.env
- ./02backup.env:/etc/dockervolumebackup/conf.d/02backup.env
- ./03never.env:/etc/dockervolumebackup/conf.d/03never.env
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/dropbox/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ services:
DROPBOX_CONCURRENCY_LEVEL: 6
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/extend/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ services:
volumes:
- ${LOCAL_DIR:-local}:/local
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/gpg-asym/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ services:
- ${KEY_DIR:-.}/public_key.asc:/keys/public_key.asc
- ${LOCAL_DIR:-./local}:/archive
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/gpg/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ services:
volumes:
- ${LOCAL_DIR:-./local}:/archive
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/local/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ services:
BACKUP_PRUNING_PREFIX: test
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${LOCAL_DIR:-./local}:/archive

offen:
2 changes: 1 addition & 1 deletion test/lock/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ services:
BACKUP_RETENTION_DAYS: '7'
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${LOCAL_DIR:-./local}:/archive

offen:
2 changes: 1 addition & 1 deletion test/pgzip/run.sh
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ docker run --rm -q \
--network test_network \
-v app_data:/backup/app_data \
-v $LOCAL_DIR:/archive \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--env BACKUP_COMPRESSION=gz \
--env GZIP_PARALLELISM=0 \
--env BACKUP_FILENAME='test.{{ .Extension }}' \
2 changes: 1 addition & 1 deletion test/proxy/docker-compose.swarm.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ services:
TASKS: ${ALLOW_TASKS:-1}
NODES: ${ALLOW_NODES:-1}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

pg:
image: postgres:14-alpine
2 changes: 1 addition & 1 deletion test/proxy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ services:
CONTAINERS: ${ALLOW_CONTAINERS:-1}
POST: ${ALLOW_POST:-1}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

pg:
image: postgres:14-alpine
2 changes: 1 addition & 1 deletion test/pruning/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ services:
BACKUP_SKIP_BACKENDS_FROM_PRUNE: 's3'
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${LOCAL_DIR:-./local}:/archive

offen:
2 changes: 1 addition & 1 deletion test/s3/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ services:
BACKUP_PRUNING_PREFIX: test
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/secrets/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ services:
BACKUP_PRUNING_LEEWAY: 5s
volumes:
- pg_data:/backup/pg_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro
secrets:
- minio_root_user
- minio_root_password
2 changes: 1 addition & 1 deletion test/services/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ services:
BACKUP_PRUNING_LEEWAY: 5s
volumes:
- pg_data:/backup/pg_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/ssh/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ services:
volumes:
- ${KEY_DIR:-.}/id_rsa:/root/.ssh/id_rsa
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/swarm/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ services:
BACKUP_PRUNING_LEEWAY: 5s
volumes:
- pg_data:/backup/pg_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/tar/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ services:
BACKUP_COMPRESSION: none
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${LOCAL_DIR:-./local}:/archive

offen:
2 changes: 1 addition & 1 deletion test/user/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ services:
volumes:
- ${LOCAL_DIR:-./local}:/archive
- app_data:/backup/data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
app_data:
2 changes: 1 addition & 1 deletion test/webdav/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ services:
WEBDAV_PASSWORD: test
volumes:
- app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/docker.sock:/var/run/docker.sock:ro

offen:
image: offen/offen:latest
2 changes: 1 addition & 1 deletion test/zstd/run.sh
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ docker run --rm -q \
--network test_network \
-v app_data:/backup/app_data \
-v $LOCAL_DIR:/archive \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--env BACKUP_COMPRESSION=zst \
--env BACKUP_FILENAME='test.{{ .Extension }}' \
--entrypoint backup \