default.rb
1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# 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
}