Python script and Ansible playbooks used to watch for changes in a directory. When there are changes the files will be backed up to an S3 bucket.
- Python 2.7
- Ansible 2.3
- A Private Key PEM file with access to an S3 bucket
- AWS Access Key ID
- AWS Secret Access Key
How To Install
In the root of the directory you wish to keep backed up, run the following:
git clone https://github.com/mcred/private-drop ./.ansible/
How To Set Up
Ansible assumes that your host has CLI access to AWS configured. This script will help set that up, but you will need two files: the PEM file that was used to create the EC2 host and a configuration file that contains the following:
export AWS_ACCESS_KEY_ID='INSERT YOUR ACCESS KEY' export AWS_SECRET_ACCESS_KEY='INSERT YOUR SECRET KEY' export EC2_REGION='INSERT YOUR REGION'
How To Use
Copy your configuration files into place:
cp ~/.ssh/YOURKEYFILE.pem ./ansible/inventory/ansible-s3.pem cp ~/.ssh/YOURAWSKEYS ./ansible/inventory/aws_keys
Once your configuration is in place, simply run `cd .ansible/ && ./privatebox ../`