docker-backup

Created: 2014-05-19 06:52
Updated: 2014-06-10 12:04
License: mit

README.md

Docker Container for Backups

NetEngine docker container for backups.

GETTING STARTED

This container is built on top of Backup gem.

Once you have docker.io set up, run:

docker run -d \
  --name backup \
  --hostname backup \
  -v /shared-data:/shared-data \
  -v /shared-logs:/shared-logs \
  netengine/backup:latest

As you can see, it relies on /shared-data & /shared-logs. However you can point it to any folder of your choice.

Once the container is running, you should set variables so that it knows what dump needs to take, and some other information like credentials to database as well as S3.

curl -X PUT -v localhost:8500/v1/kv/system_variables/s3_region -d "ap-southeast-2"
curl -X PUT -v localhost:8500/v1/kv/system_variables/s3_bucket -d "myapp-backup"
curl -X PUT -v localhost:8500/v1/kv/system_variables/s3_access_key_id -d "s3-access-key-id"
curl -X PUT -v localhost:8500/v1/kv/system_variables/s3_secret_access_key -d "s3-secret-access-key"

curl -X PUT -v localhost:8500/v1/kv/system_variables/db_name -d "database-name"
curl -X PUT -v localhost:8500/v1/kv/system_variables/db_username -d "database-username"
curl -X PUT -v localhost:8500/v1/kv/system_variables/db_password -d "database-password"
curl -X PUT -v localhost:8500/v1/kv/system_variables/db_host -d "database-hostname"

curl -X PUT -v localhost:8500/v1/kv/system_variables/dump_mysql -d "true"

OR

curl -X PUT -v localhost:8500/v1/kv/system_variables/dump_pg -d "true"

LICENSE

MIT License

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more