From 23a05d88b90345baa2d5f6c81a54c9e7b2a13b4d Mon Sep 17 00:00:00 2001 From: Lucas Breton Date: Wed, 29 Apr 2020 11:41:41 +0200 Subject: [PATCH] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 7e46526..43b2d4b 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,16 @@ The container is setup by setting [environment variables](https://docs.docker.co * `AWS_ACCESS_KEY_ID` - Optional. When using restic with AWS S3 storage. * `AWS_SECRET_ACCESS_KEY` - Optional. When using restic with AWS S3 storage. * `MAILX_ARGS` - Optional. If specified, the content of `/var/log/backup-last.log` is sent via mail after each backup using an *external SMTP*. To have maximum flexibility, you have to specify the mail/smtp parameters by your own. Have a look at the [mailx manpage](https://linux.die.net/man/1/mailx) for further information. Example value: `-e "MAILX_ARGS=-r 'from@example.de' -s 'Result of the last restic backup run' -S smtp='smtp.example.com:587' -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user='username' -S smtp-auth-password='password' 'to@example.com'"`. +* `OS_AUTH_URL` - Optional. When using restic with OpenStack Swift container. +* `OS_PROJECT_ID` - Optional. When using restic with OpenStack Swift container. +* `OS_PROJECT_NAME` - Optional. When using restic with OpenStack Swift container. +* `OS_USER_DOMAIN_NAME` - Optional. When using restic with OpenStack Swift container. +* `OS_PROJECT_DOMAIN_ID` - Optional. When using restic with OpenStack Swift container. +* `OS_USERNAME` - Optional. When using restic with OpenStack Swift container. +* `OS_PASSWORD` - Optional. When using restic with OpenStack Swift container. +* `OS_REGION_NAME` - Optional. When using restic with OpenStack Swift container. +* `OS_INTERFACE` - Optional. When using restic with OpenStack Swift container. +* `OS_IDENTITY_API_VERSION` - Optional. When using restic with OpenStack Swift container. ## Volumes @@ -99,6 +109,26 @@ Now you can simply specify the restic repository to be an [SFTP repository](http -e "RESTIC_REPOSITORY=sftp:user@host:/tmp/backup" ``` +## Backup via OpenStack Swift + +Restic can backup data to an OpenStack Swift container. Because Swift supports various authentication methods, credentials are passed through environment variables. In order to help integration with existing OpenStack installations, the naming convention of those variables follows the official Python Swift client. +Now you can simply specify the restic repository to be an [Swift repository](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#openstack-swift). + +``` +-e "RESTIC_REPOSITORY=swift:backup:/" +-e "RESTIC_PASSWORD=password" +-e "OS_AUTH_URL=https://auth.cloud.ovh.net/v3" +-e "OS_PROJECT_ID=xxxx" +-e "OS_PROJECT_NAME=xxxx" +-e "OS_USER_DOMAIN_NAME=Default" +-e "OS_PROJECT_DOMAIN_ID=default" +-e "OS_USERNAME=username" +-e "OS_PASSWORD=password" +-e "OS_REGION_NAME=SBG" +-e "OS_INTERFACE=public" +-e "OS_IDENTITY_API_VERSION=3" +``` + ## Backup via rclone To use rclone as a backend for restic, simply add the rclone config file as a volume with `-v /absolute/path/to/rclone.conf:/root/.config/rclone/rclone.conf`.