cookbook 'php_backup_s3', '~> 0.1.1'
php_backup_s3 (2) Versions 0.1.1 Follow0
Installs/Configures php_backup_s3
cookbook 'php_backup_s3', '~> 0.1.1', :supermarket
knife supermarket install php_backup_s3
knife supermarket download php_backup_s3
phpBackupS3 cookbook
This cookbook assists with the usage and deployment of phpBackupS3.
You can view the source code, get help, and contribute to this cookbook on GitHub.
Requirements
-
You must have PHP installed on the system. On Ubuntu you can do that with this command:
sudo apt-get install php5-cli php5-mysql php5-curl
-
You must also have
git
installed on your system. On Ubuntu you can do that with this command:sudo apt-get install git
Usage
Place the php_backup_s3::default
cookbook in your run_list. This will install php_backup_s3
on your node and setup the cron job to run the backups.
Once the php_backup_s3::default
cookbook as been run, you will need to call either or both of the LWRPs in order to actually back up files and/or databases, as follows:
php_backup_s3 "etc" do
backup_files %w(/etc /root)
databases = []
databases << {
"hostname" => "host",
"username" => "user",
"password" => "pass",
"password" => "pass",
"query" => "SELECT * WHERE 1 = 1"
}
backup_dbs databases
end
Please see the recipes/test.rb file for an example.
Attributes
Required
-
node["php_backup_s3"]["s3_bucket"]
- This is the s3 bucket that you want to backup to. -
node["php_backup_s3"]["aws_access_key"]
- You must supply your AWS access key. -
node["php_backup_s3"]["aws_secret_key"]
- You must supply your AWS secret key.
Defaults
-
node["php_backup_s3"]["frequency"]
- This will set how often your backup will run. Can be set to one of: weekly, daily, hourly. Default is "daily". -
node["php_backup_s3"]["cron"]["minute"]
- Set the minute that the backup will run. The default is "0". -
node["php_backup_s3"]["cron"]["hour"]
- Set the hour that the backup will run. The default is "0". -
node["php_backup_s3"]["cron"]["weekday"]
- Set the weekday that the backup will run. The default is "0" or Sunday.
Recipes
There are no external recipe dependencies.
Author
Author:: Ian Neubert (ian@ianneubert.com)
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.1 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.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: php_backup_s3/metadata.rb:1
FC065: Ensure source_url is set in metadata: php_backup_s3/metadata.rb:1
FC066: Ensure chef_version is set in metadata: php_backup_s3/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: php_backup_s3/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 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.1.1 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.1.1 failed this metric
0.1.1 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.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: php_backup_s3/metadata.rb:1
FC065: Ensure source_url is set in metadata: php_backup_s3/metadata.rb:1
FC066: Ensure chef_version is set in metadata: php_backup_s3/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: php_backup_s3/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 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.1.1 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.1.1 failed this metric
FC065: Ensure source_url is set in metadata: php_backup_s3/metadata.rb:1
FC066: Ensure chef_version is set in metadata: php_backup_s3/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: php_backup_s3/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.1 passed this metric
Testing File Metric
0.1.1 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.1.1 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.1.1 failed this metric
0.1.1 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