default.rb 1.84 KB
#
# Author:: Earth U (<sysadmin@chromedia.com>)
# Cookbook Name:: backup-file2s3
# Attributes:: default
#
# Copyright 2016, Chromedia Far East, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

default['backup-file2s3']['bucket']      = 'bucketname'
default['backup-file2s3']['region']      = 'us-east-1'
default['backup-file2s3']['max_backups'] = 30

# The array of file directories to be backed up to S3
default['backup-file2s3']['dirs'] = []

default['backup-file2s3']['script_dir'] = '/etc/backup_file_to_s3'
default['backup-file2s3']['log_dir'] = '/var/log/backup_file_to_s3'
default['backup-file2s3']['tmp_dir'] = '/tmp/backup_files'

default['backup-file2s3']['aws_bin'] = value_for_platform(
  'ubuntu'  => { 'default' => '/usr/local/bin/aws' },
  'default' => '/usr/local/bin/aws'   # haven't tested on other platforms yet
)

# Basic options for cron
default['backup-file2s3']['cron']['min']    = '0'
default['backup-file2s3']['cron']['hour']   = '0'
default['backup-file2s3']['cron']['day']    = '*'
default['backup-file2s3']['cron']['mon']    = '*'
default['backup-file2s3']['cron']['wday']   = '*'
default['backup-file2s3']['cron']['mailto'] = "''"

# Basic options for logrotate
default['backup-file2s3']['logrotate']['conf_dir'] = '/etc/logrotate.d'
default['backup-file2s3']['logrotate']['options']  = %w{
  weekly
  rotate\ 12
  missingok
  compress
  notifempty
}