Sign inSign up

gurujoe/duplicity

By gurujoe

•Updated 1 day ago

Current version of Duplicity with Azure and AWS S3 support. Automatically kept up to date.

Image
0

10K+

gurujoe/duplicity repository overview

⁠Duplicity backup tool with Azure and AWS support

This is the duplicity⁠ backup tool configured to support backups to Azure blob storage and AWS S3 buckets. There are several other docker images for Duplicity, but I could not find one using the latest version that also supported Azure. wernight/duplicity⁠ doesn't support Azure, tecnativa/duplicity⁠ used to but removed Azure support a few years ago due to a dependency problem. Most other images have not been updated in years.

This is based on the latest version of alpine running the latest duplicity published to the alpine repository⁠. This image is automatically updated when the base alpine image is updated OR when the version of duplicity available in alpine's package repository changes. It supports all the architectures alpine supports.

⁠Usage

General help with Duplicity:

$ docker run --rm gurujoe/duplicity duplicity --help

You must:

  • Mount what you want to backup or where you want to restore a backup.
  • Mount a folder attached to /root in the container in order to store the duplicity .cache and .gnupg folders. Without this, duplicity will have to download the backup signatures and manifests each time you run, and the container will grow (potentially many gigabytes) to hold this information.
  • Use the --allow-source-mismatch flag, since each time you run duplicity in docker it uses a different hostname
  • Set environment variable PASSPHRASE as a GPG key to encrypt the backup
  • For Azure, set environment variable AZURE_CONNECTION_STRING to configure your Azure storage account. A typical Azure storage connection string⁠ looks like this: DefaultEndpointsProtocol=https;AccountName=<storage account name>;AccountKey=<access key>;EndpointSuffix=core.windows.net
  • For S3, set environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to correspond to the access key and secret for an IAM user that has permissions to read and write the S3 bucket
⁠Backup to Azure Example

This example backs up the /raid/pictures folder on the local system to a "picturesbackup" container in Azure blob storage.

    sudo docker run --rm \
      -v /raid/hostcache:/root \
      -v /raid/pictures:/pictures \
      -e PASSPHRASE=MyGreatPassword \
      -e AZURE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=myazstorageaccount;AccountKey=myazaccesskey;EndpointSuffix=core.windows.net" \ 
      gurujoe/duplicity duplicity --allow-source-mismatch /pictures azure://picturesbackup
  • --rm removes the container when the run is complete
  • The first -v mounts the /root folder to the host's /raid/hostcache folder to store the .cache and .gnupg folders.
  • The second -v mounts a /pictures folder in the container to the host's /raid/pictures folder (the folder we want backed up or restored)
⁠Backup to S3 Example

Similarly, this example backs up the /raid/pictures folder on the local system to an AWS S3 bucket named "picturesbackup".

    sudo docker run --rm \
      -v /raid/hostcache:/root \
      -v /raid/pictures:/pictures \
      -e PASSPHRASE=MyGreatPassword \
      -e AWS_ACCESS_KEY_ID="MY_ACCESS_KEY_ID" \
      -e AWS_SECRET_ACCESS_KEY="MY_SECRET_ACCESS_KEY" \
      gurujoe/duplicity duplicity --allow-source-mismatch /pictures s3://picturesbackup

Tag summary

Content type

Image

Digest

sha256:fabbf544f…

Size

52.4 MB

Last updated

1 day ago

docker pull gurujoe/duplicity