{"id":13437352,"url":"https://github.com/wernight/docker-duplicity","last_synced_at":"2026-01-23T17:50:46.431Z","repository":{"id":48880257,"uuid":"50185767","full_name":"wernight/docker-duplicity","owner":"wernight","description":"Dockerize \"duplicity\" backup tool.","archived":false,"fork":false,"pushed_at":"2024-07-09T19:08:15.000Z","size":442,"stargazers_count":39,"open_issues_count":12,"forks_count":30,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T06:41:54.359Z","etag":null,"topics":["backup","docker-image","duplicity","encrypted","google-cloud-storage","google-drive","storage"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/wernight/duplicity/","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wernight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-22T14:23:03.000Z","updated_at":"2024-10-01T11:56:56.000Z","dependencies_parsed_at":"2024-11-01T21:30:18.651Z","dependency_job_id":null,"html_url":"https://github.com/wernight/docker-duplicity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wernight/docker-duplicity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wernight%2Fdocker-duplicity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wernight%2Fdocker-duplicity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wernight%2Fdocker-duplicity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wernight%2Fdocker-duplicity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wernight","download_url":"https://codeload.github.com/wernight/docker-duplicity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wernight%2Fdocker-duplicity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28697328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","docker-image","duplicity","encrypted","google-cloud-storage","google-drive","storage"],"created_at":"2024-07-31T03:00:56.246Z","updated_at":"2026-01-23T17:50:46.402Z","avatar_url":"https://github.com/wernight.png","language":"Dockerfile","readme":"# Supported tags and respective `Dockerfile` links\n\n  * [`latest`](https://github.com/wernight/docker-duplicity/blob/master/latest/Dockerfile)\n  * [`stable`](https://github.com/wernight/docker-duplicity/blob/master/stable/Dockerfile)\n\n# What is Duplicity?\n\n**[duplicity](http://duplicity.nongnu.org/)** backup tool.\n\nFeatures of this Docker image:\n\n  * **Small**: Built using [alpine](https://hub.docker.com/_/alpine/).\n  * **Simple**: Most common cases are explained below and require minimal setup.\n  * **Secure**: Runs non-root by default (use randomly chosen UID `1896`), and meant to run as any user.\n\n\n## Usage\n\nFor the general command-line syntax, do:\n\n    $ docker run --rm wernight/duplicity duplicity --help\n\nIn general you...\n\n  * Must mount what you want to backup or where you want to restore a backup.\n  * Should mount `/home/duplicity/.cache/duplicity` as writable somewhere (if not cached, [duplicity will have to recreate it from the remote repository which may require decrypting the backup contents](http://duplicity.nongnu.org/duplicity.1.html#sect5)). Note it may be quite large and contains metadata info about files you've backed up in clear text.\n  * Should mount `/home/duplicity/.gnupg` as writable somewhere (that directory is used to validate incremental backups and shouldn't be necessary to restore your backup if you follows steps below).\n  * Should specify duplicity flag `--allow-source-mismatch` because Docker has a random host for each container.\n  * Could set environment variable `PASSPHRASE`, unless you want to type it manually in the prompt (remember then to add `-it`).\n  * May have to mount a few other files for authentication (see examples below).\n\n\nExample of commands you may want to run **periodically to back up** with good clean-up/maintenance (see below for various storage options):\n\n     $ docker run --rm ... wernight/duplicity duplicity --full-if-older-than=6M source_directory target_url\n     $ docker run --rm ... wernight/duplicity duplicity remove-older-than 6M --force target_url\n     $ docker run --rm ... wernight/duplicity duplicity cleanup --force target_url\n\nThis would do:\n\n 1. A full backup every 6 months so that restoration is a lot faster and for cleanup to work,\n    and incremental backups the rest of the time.\n 2. Delete backups older than 6 months (doesn't break incremental backups).\n 3. Delete files from failed sessions (if any).\n\n\n### Backup to **Google Cloud Storage** example\n\n**[Google Cloud Storage](https://cloud.google.com/storage/)** *nearline* [costs about $0.01/GB/Month](https://cloud.google.com/storage/pricing).\n\n**Set up**:\n\n 1. [Sign up, create an empty project, enable billing, and create a *bucket*](https://cloud.google.com/storage/docs/getting-started-console)\n 2. Under [\"Storage\" section \u003e \"Settings\"](https://console.cloud.google.com/project/_/storage/settings) \u003e \"Interoperability\" tab \u003e click \"Enable interoperable access\" and then \"Create a new key\" button and note both *Access Key*\tand *Secret*. Also note your *Project Number* (aka project ID, it's a number like 1233457890).\n 3. Run [gcloud's `gsutil config -a`](https://cloud.google.com/storage/docs/getting-started-gsutil) to generate the `~/.boto` configuration file and give it all these info (alternatively you should be able to set environment variable `GS_ACCESS_KEY_ID` and `GS_SECRET_ACCESS_KEY` however in my tries I didn't see where to set your project ID).\n 4. You should now have a `~/.boto` looking like:\n\n        [Credentials]\n        gs_access_key_id = MYGOOGLEACCESSKEY\n        gs_secret_access_key = SomeVeryLongAccessKeyXXXXXXXX\n    \n        [GSUtil]\n        default_project_id = 1233457890\n\nNow you're ready to perform a **backup**:\n\n    $ docker run --rm --user $UID \\\n          -e PASSPHRASE=P4ssw0rd \\\n          -v $PWD/.cache:/home/duplicity/.cache/duplicity \\\n          -v $PWD/.gnupg:/home/duplicity/.gnupg \\\n          -v ~/.boto:/home/duplicity/.boto:ro \\\n          -v /:/data:ro \\\n          wernight/duplicity \\\n          duplicity --full-if-older-than=6M --allow-source-mismatch /data gs://my-bucket-name/some_dir\n\nTo **restore**, you'll need:\n\n  * Keep `.boto` or regenerate it to access your Google Cloud Storage.\n  * The `PASSPHRASE` you've used.\n\nExample:\n\n    $ docker run --rm --user $UID \\\n          -e PASSPHRASE=P4ssw0rd \\\n          -v ~/.boto:/home/duplicity/.boto:ro \\\n          -v /:/data:ro \\\n          wernight/duplicity \\\n          duplicity restore gs://my-bucket-name/some_dir /data\n          \nSee also the [note on Google Cloud Storage](http://duplicity.nongnu.org/duplicity.1.html#sect15).\n\n\n### Backup to **Google Drive** example\n\n**[Google Drive](https://drive.google.com/)** offers [15GB for free](https://support.google.com/drive/answer/2375123).\n\n**Set up**:\n\n 1. Follow notes [on Pydrive Backend](http://duplicity.nongnu.org/duplicity.1.html#sect20) to generate a P12 credential file (call it `pydriveprivatekey.p12`) and note also the associated service account email generated (e.g. `duplicity@developer.gserviceaccount.com`).\n 2. Convert P12 to PEM:\n\n        $ docker run --rm -i --user $UID \\\n              -v $PWD/pydriveprivatekey.p12:/pydriveprivatekey.p12:ro \\\n              wernight/duplicity \\\n              openssl pkcs12 -in /pydriveprivatekey.p12 -nodes -nocerts \u003epydriveprivatekey.pem\n        Enter Import Password: notasecret\n\nNow you're ready to perform a **backup**:\n\n    $ docker run --rm --user $UID \\\n          -e PASSPHRASE=P4ssw0rd \\\n          -e GOOGLE_DRIVE_ACCOUNT_KEY=$(cat pydriveprivatekey.pem) \\\n          -v $PWD/.cache:/home/duplicity/.cache/duplicity \\\n          -v $PWD/.gnupg:/home/duplicity/.gnupg \\\n          -v /:/data:ro \\\n          wernight/duplicity \\\n          duplicity --full-if-older-than=6M --allow-source-mismatch /data pydrive://duplicity@developer.gserviceaccount.com/some_dir\n\nTo **restore**, you'll need:\n\n  * Regenerate a PEM file (or keep it somewhere).\n  * The `PASSPHRASE` you've used.\n\n### Backup via **rsync** example\n\nSupposing you've an **SSH** access to some machine, you can:\n\n    $ docker run --rm -it --user root \\\n          -e PASSPHRASE=P4ssw0rd \\\n          -v $PWD/.cache:/home/duplicity/.cache/duplicity \\\n          -v $PWD/.gnupg:/home/duplicity/.gnupg \\\n          -v ~/.ssh/id_rsa:/id_rsa:ro \\\n          -v ~/.ssh/known_hosts:/etc/ssh/ssh_known_hosts:ro \\\n          -v /:/data:ro \\\n          wernight/duplicity \\\n          duplicity --full-if-older-than=6M --allow-source-mismatch \\\n          --rsync-options='-e \"ssh -i /id_rsa\"' \\\n          /data rsync://user@example.com/some_dir\n\nNote: We're running here as `root` to have access to `~/.ssh` and also because ssh does not\nallow to use a random (non-locally existing) UID. To make it safer, you can copy your `~/.ssh`\nand `chown 1896` it (that is `duplicity` UID within the container). If you know a another way to avoid\nthe \"No user exists for uid\" check, please let me know.\n\n\n## Alias\n\nHere is a simple alias that should work in most cases:\n\n    $ alias duplicity='docker run --rm --user=root -v ~/.ssh/id_rsa:/home/duplicity/.ssh/id_rsa:ro -v ~/.boto:/home/duplicity/.boto:ro -v ~/.gnupg:/home/duplicity/.gnupg -v /:/mnt:ro -e PASSPHRASE=$PASSPHRASE wernight/duplicity duplicity $@'\n\nNow you should be able to run duplicity almost as if it were installed, example:\n\n    $ PASSPHRASE=123456 duplicity --progress /mnt rsync://user@example.com/some_dir\n\n\n## See also\n\n  * [duplicity man](http://duplicity.nongnu.org/duplicity.1.html) page\n  * [duplicity back-up how-to - Ubuntu](https://help.ubuntu.com/community/DuplicityBackupHowto)\n  * [How To Use Duplicity with GPG to Securely Automate Backups on Ubuntu | DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-use-duplicity-with-gpg-to-securely-automate-backups-on-ubuntu)\n\n\n## Feedbacks\n\nReport issues/questions/feature requests on [GitHub Issues](https://github.com/wernight/docker-duplicity/issues).\n","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwernight%2Fdocker-duplicity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwernight%2Fdocker-duplicity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwernight%2Fdocker-duplicity/lists"}