https://github.com/uber5/ansible-role-duply_backup
https://github.com/uber5/ansible-role-duply_backup
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uber5/ansible-role-duply_backup
- Owner: Uber5
- Created: 2015-04-23T13:57:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-06T09:07:48.000Z (about 11 years ago)
- Last Synced: 2025-02-24T12:21:57.377Z (over 1 year ago)
- Size: 129 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What?
This is an [Ansible](http://docs.ansible.com/) role to setup backups via
[Duply](http://duply.net/).
TODO: duply config may have to be adjusted as described here:
https://raim.codingfarm.de/blog/2015/03/12/backup-with-duply-to-amazon-s3-backendexception-no-connection-to-backend/
# How to Use
## With a simple duply target (e.g. scp)
In your playbook:
```
- hosts: some-hosts
roles:
- role: duply_backup
backing_up_user: user1
pre_script: templates/duply_pre.sh.j2
backup_password: veryTopS111cret
backup_src: /home/user1/important-stuff
backup_target: scp://backups@my-backup-server.com/user1
```
## With Amazon S3
In your playbook:
```
- role: duply_backup
backing_up_user: user1
pre_script: templates/testing/duply_pre.sh.j2
backup_password: topSecretPassword
backup_src: /home/user1/important-stuff
backup_target: s3://s3-ap-southeast-2.amazonaws.com/backups-bucket/user1
backup_target_user: 's3-id'
backup_target_pass: 's3-secret'
```
The bucket needs an appropriate policy. The following works, but may be more
liberal than necessary:
```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123:user/backups-myhost"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::backups-bucket"
},
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123:user/backups-myhost"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::backups-bucket/*"
}
]
}
```