This cookbook setups backup to backup MySQL/MariaDB database into an S3 bucket.
At the moment this recipe is VERY incomplete and covers only 1 very specific use case: it creates a backup of a single db (from MySQL/MariaDB), compress it and stores it into AWS S3.
This recipe requires cron cookbook.
Just drop
cookbook 'cron'
in your Cheffile and run
librarian-chef install
{
"enabled": true,
"user": "..",
"destination": {
"to": "s3",
"access_key_id": "..",
"secret_access_key": "..",
"bucket_name": "..",
"region": ".."
},
"hooks": {
"slack": {
"webhook_url": ".."
}
}
}
Key | Type | Description | Default |
---|---|---|---|
['backup']['enabled'] | Boolean | whether to setup backup or not | true |
['backup']['user'] | String | user which performs backup (configuration file will be placed in its home directory) | nil |
['backup']['destination']['to'] | String | destination kind (for the moment it must be "s3") | "s3" |
['backup']['destination']['access_key_id'] | String | AWS access key id | nil |
['backup']['destination']['secret_access_key'] | String | AWS secret access key | nil |
['backup']['destination']['bucket_name'] | String | AWS bucket name | nil |
['backup']['destination']['region'] | String | AWS region | nil |
['backup']['hooks']['slack']['webhook_url'] | String | URL of the slack's webhook where to put backup's notifications | nil |
Just include backup
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[backup]"
]
}
and add needed attributes (you can use the structure above)
This recipe is highly not complete, until it will be more completed it's not worth to contribute on it.
License: MIT
Authors:
Simone Dall'Angelo