ADD: S3 compatibility

This commit is contained in:
Matthias Leutenegger 2019-12-17 14:19:25 +01:00
parent a70b578320
commit 8b0c016e7d
4 changed files with 23 additions and 6 deletions

View file

@ -3,6 +3,10 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
and [human-readable changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
### Added
* S3 Support
## 0.1.5
### Changed
* Path generation for `forget` task now checks if `src` is actually filled and not only defined.
@ -34,4 +38,3 @@ and [human-readable changelog](https://keepachangelog.com/en/1.0.0/).
## 0.1.0
### Added
* initial release

View file

@ -85,11 +85,13 @@ official [documentation](https://restic.readthedocs.io/en/stable/030_preparing_a
Available variables:
| Name | Required | Description |
| ---------- |:--------:| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `location` | yes | The location of the Backend. Currently, [Local](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#local) and [SFTP](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#sftp) are supported |
| `password` | yes | The password used to secure this repository |
| `init` | no | Describes if the repository should be initialized or not. Use `false` if you are backuping to an already existing repo. |
| Name | Required | Description |
| ----------------------- |:--------:| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `location` | yes | The location of the Backend. Currently, [Local](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#local), [SFTP](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#sftp and [S3](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#amazon-s3) are supported |
| `password` | yes | The password used to secure this repository |
| `init` | no | Describes if the repository should be initialized or not. Use `false` if you are backuping to an already existing repo. |
| `aws_access_key` | no | The access key for the S3 backend |
| `aws_secret_access_key` | no | The secret access key for the S3 backend |
Example:
```yaml

View file

@ -4,6 +4,12 @@
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
export RESTIC_PASSWORD={{ restic_repos[item.repo].password }}
{% if restic_repos[item.repo].aws_access_key is defined %}
AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
{% endif %}
{% if restic_repos[item.repo].aws_secret_access_key is defined %}
AWS_SECRET_ACCESS_KEY={{ restic_repos[item.repo].aws_secret_access_key }}
{% endif %}
BACKUP_NAME={{ item.name }}
{% if item.src is defined %}
BACKUP_SOURCE={{ item.src }}

View file

@ -5,6 +5,12 @@
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
export RESTIC_PASSWORD={{ restic_repos[item.repo].password }}
BACKUP_NAME={{ item.name }}
{% if restic_repos[item.repo].aws_access_key is defined %}
AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
{% endif %}
{% if restic_repos[item.repo].aws_secret_access_key is defined %}
AWS_SECRET_ACCESS_KEY={{ restic_repos[item.repo].aws_secret_access_key }}
{% endif %}
{% if item.src is defined %}
BACKUP_SOURCE={{ item.src }}
{% endif %}