diff --git a/metadata.rb b/metadata.rb index f35259a..1205d96 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,6 +4,6 @@ license 'BSD 3-Clause' description 'Sets up automated chef-server backups using knife-backup' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '1.2.0' +version '1.2.1' depends 'cron' diff --git a/providers/job.rb b/providers/job.rb index 01c4ebc..25c94e1 100644 --- a/providers/job.rb +++ b/providers/job.rb @@ -117,5 +117,5 @@ def cron_clean_name end def cron_clean_command - "find #{ backup_dir } -type f -name \"*.zip\" -mtime +#{ new_resource.retention } -delete" + "find #{ backup_dir } -type f -name \"*.tgz\" -mtime +#{ new_resource.retention } -delete" end diff --git a/test/integration/default/serverspec/build_jobs_spec.rb b/test/integration/default/serverspec/build_jobs_spec.rb index ac42d10..39a0420 100644 --- a/test/integration/default/serverspec/build_jobs_spec.rb +++ b/test/integration/default/serverspec/build_jobs_spec.rb @@ -24,7 +24,7 @@ describe file('/etc/cron.d/dc01-backup-clean') do its(:content) { should contain('find /var/chef/backup/dc01/') } - its(:content) { should contain('-type f -name "\*\.zip"') } + its(:content) { should contain('-type f -name "\*\.tgz"') } its(:content) { should contain('-mtime \+31') } its(:content) { should contain('-delete') } end