Skip to content

Ansible role to backup folders to tar.gz and copy them to amazon s3 bucket

Notifications You must be signed in to change notification settings

dtorresf/ansible-backup-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backups3

Ansible role to backup folders to tar.gz and copy them to amazon s3 bucket.

Requirements

You just need your ansible installation nothing more.

Role Variables

Variables in default.yml:

Configure local backup path where the role will generate the tar for the specified directories. local_backup_dir: /backups3

Configure environment for backups (demo, production, qa, etc)

customer: demo

AWS S3 bucket name

bucket_name: mybucket

Dictionary with each path to backup

	paths_to_backup:
	  path1:
	    path: /var/www
	    tag: www
	  path2:
	    path: /var/test_backup
	    tag: test

AWS credentials

aws_access_key: aws_access_key
aws_secret_key: aws_secret_key

AWS access and secret key for account. This user must have read/write permissions for S3 service.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
  roles:
     - backups3

License

GPL v3

Author Information

Daniela Torres Faria danielatorres@danielatorres.me www.danielatorres.me

About

Ansible role to backup folders to tar.gz and copy them to amazon s3 bucket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published