cookbook 'database_restore', '~> 0.2.0'
database_restore (1) Versions 0.2.0 Follow0
Installs/Configures database_restore
cookbook 'database_restore', '~> 0.2.0', :supermarket
knife supermarket install database_restore
knife supermarket download database_restore
Database Restore Cookbook
Cookbook to restore a mysql database backups generated from Backup Gem
Supported Platforms
- Ubuntu 12.04
Attributes
<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['database_restore']['s3_bucket']</tt></td>
<td>String</td>
<td>s3 bucket to grab from</td>
<td><tt></tt></td>
</tr>
<tr>
<td><tt>['database_restore']['s3_dir_path']</tt></td>
<td>String</td>
<td>path inside the s3 bucket to the date directories</td>
<td><tt></tt></td>
</tr>
<tr>
<td><tt>['database_restore']['database_name']</tt></td>
<td>String</td>
<td>database to restore to</td>
<td><tt>wordpress</tt></td>
</tr>
<tr>
<td><tt>['database_restore']['database_user']</tt></td>
<td>String</td>
<td>database user used to restore</td>
<td><tt>wordpress</tt></td>
</tr>
<tr>
<td><tt>['database_restore']['database_backup_name']</tt></td>
<td>String</td>
<td>name of database found inside the backup</td>
<td><tt>node[:database_restore][:database_name]</tt></td>
</tr>
</table>
Resources/Providers
database_restore_download_s3_backup_file "/tmp/database.tgz" do aws_access_key_id 'YOUR_KEY_HERE' aws_secret_access_key 'YOUR_SECRET_KEY_HERE' s3_dir_path 'databases/mydatabase' s3_bucket 'mybackups' database 'mydatabase' action :create end database_restore_from_file "/tmp/database.tgz" do source "/tmp/database.tgz" database_name 'mydatabase' database_backup_name 'mydatabase' extract_to '/tmp' mysql_host 'localhost' mysql_username 'databaseuser' mysql_password 'password' end
Usage
database_restore::default
Include database_restore
in your node's run_list
:
{ "run_list": [ "recipe[database_restore::default]" ] }
Contributing
- Fork the repository on Github
- Create a named feature branch (i.e.
add-new-recipe
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request
License and Authors
Author:: Nathan Lee (nathan@globalphobia.com)
Dependent cookbooks
mysql >= 0.0.0 |
database >= 0.0.0 |
libarchive >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
0.1.0
Initial release of database_restore
-
Enhancements
- an enhancement
-
Bug Fixes
- a bug fix
Collaborator Number Metric
0.2.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: database_restore/metadata.rb:1
FC065: Ensure source_url is set in metadata: database_restore/metadata.rb:1
FC066: Ensure chef_version is set in metadata: database_restore/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: database_restore/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: database_restore/resources/download_s3_backup_file.rb:1
FC074: LWRP should use DSL to define resource's default action: database_restore/resources/from_file.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: database_restore/providers/download_s3_backup_file.rb:60
FC085: Resource using new_resource.updated_by_last_action to converge resource: database_restore/providers/from_file.rb:55
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: database_restore/metadata.rb:1
FC065: Ensure source_url is set in metadata: database_restore/metadata.rb:1
FC066: Ensure chef_version is set in metadata: database_restore/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: database_restore/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: database_restore/resources/download_s3_backup_file.rb:1
FC074: LWRP should use DSL to define resource's default action: database_restore/resources/from_file.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: database_restore/providers/download_s3_backup_file.rb:60
FC085: Resource using new_resource.updated_by_last_action to converge resource: database_restore/providers/from_file.rb:55
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
FC065: Ensure source_url is set in metadata: database_restore/metadata.rb:1
FC066: Ensure chef_version is set in metadata: database_restore/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: database_restore/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: database_restore/resources/download_s3_backup_file.rb:1
FC074: LWRP should use DSL to define resource's default action: database_restore/resources/from_file.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: database_restore/providers/download_s3_backup_file.rb:60
FC085: Resource using new_resource.updated_by_last_action to converge resource: database_restore/providers/from_file.rb:55
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number