1
|
# This file is part of Greyhole.
|
2
|
|
3
|
#### Database Connection ####
|
4
|
# Available engines: mysql
|
5
|
|
6
|
db_engine = mysql
|
7
|
db_host = localhost
|
8
|
db_user = greyhole_user
|
9
|
db_pass = 89y63jdwe
|
10
|
db_name = greyhole
|
11
|
|
12
|
#### Timezone ####
|
13
|
# You can comment this out if you already define a `date.timezone` in your php.ini. Otherwise, this config option is mandatory.
|
14
|
# See the list of allowed values here: http://www.php.net/manual/en/timezones.php
|
15
|
|
16
|
#timezone = America/Montreal
|
17
|
|
18
|
#### Email Recipient ####
|
19
|
# Will receive email reports for daily fsck, or when all drives are out of
|
20
|
# available space.
|
21
|
# When specifying no @hostname, the email will be delivered to the local
|
22
|
# mailbox of that user.
|
23
|
# Make sure you have a MTA installed (sendmail, postfix, ...), or no emails will be sent!
|
24
|
|
25
|
email_to = root
|
26
|
#email_to = root@test.com
|
27
|
|
28
|
#### Greyhole Daemon Niceness ####
|
29
|
# Niceness of the background daemon that handle most of the heavy lifting.
|
30
|
# Number between -20 and 19.
|
31
|
# The higher the number, the more 'nice' the daemon will be, i.e. the less
|
32
|
# resources it will get, versus other processes with a lower niceness.
|
33
|
|
34
|
# daemon_niceness = 1
|
35
|
|
36
|
#### Greyhole Log File ####
|
37
|
# If you define a greyhole_error_log_file, WARNING, ERROR and CRITICAL logs will be written there, instead of using greyhole_log_file.
|
38
|
# Notes:
|
39
|
# - greyhole_error_log_file will be ignored if greyhole_log_file = syslog.
|
40
|
# - you can't use syslog for greyhole_error_log_file and a normal file for greyhole_log_file.
|
41
|
# - if you use something else than /var/log/greyhole.*, you will want to change /etc/logrotate.d/greyhole accordingly.
|
42
|
|
43
|
# greyhole_log_file = syslog
|
44
|
greyhole_log_file = /var/log/greyhole.log
|
45
|
# greyhole_error_log_file = /var/log/greyhole.err
|
46
|
|
47
|
# Available verbosity levels: DEBUG, INFO, WARN, ERROR
|
48
|
# Note that for --status to work correctly, you'll need to keep this to DEBUG.
|
49
|
|
50
|
log_level = DEBUG
|
51
|
|
52
|
# Log Greyhole memory usage on each log line?
|
53
|
|
54
|
log_memory_usage = no
|
55
|
|
56
|
# Look for other processes working on files on the Greyhole shares?
|
57
|
# Disable to get more speed, but this might break some files, if any
|
58
|
# application change your files while Greyhole tries to work on them.
|
59
|
|
60
|
check_for_open_files = yes
|
61
|
|
62
|
#### Copying ####
|
63
|
# Options for the command that will create file copies
|
64
|
|
65
|
# Calculate MD5 of new/changed files, while making file copies.
|
66
|
# calculate_md5 = yes
|
67
|
|
68
|
# Create all file copies simultaneously, instead of sequentially.
|
69
|
# parallel_copying = yes
|
70
|
|
71
|
#### Shares Settings ####
|
72
|
# Number of copies of each file you want Greyhole to keep, per Share.
|
73
|
# This is not the number of duplicates! 2 copies = 1 duplicate
|
74
|
# If you change one of those, you should run fsck manually, or wait for the
|
75
|
# daily fsck, to have the additional copies created, or extra copies deleted.
|
76
|
#
|
77
|
# Example:
|
78
|
#
|
79
|
# num_copies[Backups] = 2
|
80
|
# num_copies[CrashPlan] = 2
|
81
|
# num_copies[Games] = 2
|
82
|
# num_copies[Music] = 2
|
83
|
# # This will insure those files are on all HDD:
|
84
|
# num_copies[Photos] = max
|
85
|
# num_copies[RecordedTV] = 1
|
86
|
# num_copies[Software] = 2
|
87
|
# num_copies[TimeMachine] = 1
|
88
|
# num_copies[Videos] = 2
|
89
|
|
90
|
#### Storage Pool ####
|
91
|
# Where should the file copies be kept?
|
92
|
# You probably want to list all your physical hard drives here.
|
93
|
# Also specify how much free space you want to reserve on each drive. This is
|
94
|
# a soft limit that will be ignored if the necessary hard drives are below
|
95
|
# their minimum.
|
96
|
# For example, if you specify a 100 GB limit on all drives, and only one still
|
97
|
# have more than 100 GB of free space, and you save a new file on a share for
|
98
|
# which you specified you want multiple copies, this drive will be used first,
|
99
|
# but the other drives that have less free space will be used to store the
|
100
|
# additional copies.
|
101
|
#
|
102
|
# Example:
|
103
|
#
|
104
|
# storage_pool_drive = /mnt/hdd0/gh, min_free: 10gb
|
105
|
# storage_pool_drive = /mnt/hdd1/gh, min_free: 10gb
|
106
|
# storage_pool_drive = /mnt/hdd2/gh, min_free: 10gb
|
107
|
# storage_pool_drive = /mnt/hdd3/gh, min_free: 10gb
|
108
|
|
109
|
# The following can help you test Greyhole by defining multiple storage_pool_drive
|
110
|
# that are in fact just empty directories on the same drive.
|
111
|
# WARNING! Do NOT enable that option when you're not testing Greyhole.
|
112
|
# Doing so could result is lost data when a drive will fail.
|
113
|
#
|
114
|
# allow_multiple_sp_per_device = no
|
115
|
|
116
|
### Storage Drive Selection Groups ###
|
117
|
# The groups you define here will be available to use in the
|
118
|
# drive_selection_algorithm option(s) below.
|
119
|
# The group names (OK, NEW, BROKEN, REMOTE in the example below) can be
|
120
|
# anything you'd like.
|
121
|
# Use one line per group, with the following syntax:
|
122
|
# group name: one or more (comma-separated) storage pool drives
|
123
|
# If you ommit any storage pool drive from your groups, this drive
|
124
|
# will NOT be used by Greyhole!
|
125
|
#
|
126
|
# See https://github.com/gboudreau/Greyhole/wiki/SuggestedStorageSelectionAlgorithmUsage
|
127
|
# on how we suggest you use this feature.
|
128
|
|
129
|
# drive_selection_groups = OK: /mnt/hdd0/gh, /mnt/hdd2/gh
|
130
|
# NEW: /mnt/hdd1/gh
|
131
|
# BROKEN: /mnt/hdd3/gh
|
132
|
# REMOTE: /mnt/remote1/gh
|
133
|
|
134
|
# You can also define drive_selection_groups for specific shares:
|
135
|
#
|
136
|
# drive_selection_groups[Photos] = SATA: /mnt/hdd0/gh
|
137
|
# IDE: /mnt/hdd1/gh, /mnt/hdd2/gh
|
138
|
# USB: /mnt/hdd3/gh
|
139
|
|
140
|
#### Storage Drive Selection Algorithm ####
|
141
|
# available algorithms: most_available_space, least_used_space
|
142
|
# most_available_space: use the drives with the most available space
|
143
|
# first, so that available space on all drives should become and stay
|
144
|
# balanced.
|
145
|
# least_used_space: use the drives with the least used space
|
146
|
# first, so that used space on all drives should become and stay
|
147
|
# balanced.
|
148
|
|
149
|
drive_selection_algorithm = most_available_space
|
150
|
|
151
|
# If you defined drive_selection_groups above, you'll want to use them here.
|
152
|
# Use the 'forced' keyword, then list the groups you want to use, in order, and
|
153
|
# prefix each group name with the number of drives you want to use from
|
154
|
# that group before using the next group.
|
155
|
# Use the 'all' keyword to indicate you want Greyhole to use all drives
|
156
|
# from a specific group before starting to use drives from the next group.
|
157
|
# You'll need to indicate how Greyhole should pick drives within a group by
|
158
|
# ending your line with either 'least_used_space' or 'most_available_space'.
|
159
|
#
|
160
|
# drive_selection_algorithm = forced (1xOK, 1xNEW, 1xBROKEN, 1xREMOTE) most_available_space
|
161
|
|
162
|
# You can also define drive_selection_algorithm for specific shares:
|
163
|
#
|
164
|
# drive_selection_algorithm[Videos] = least_used_space
|
165
|
# drive_selection_algorithm[Photos] = forced (all SATA, 1xIDE, 1xUSB) most_available_space
|
166
|
|
167
|
#### Sticky Files ####
|
168
|
# Sticky files are files that will always 'live' together, in the storage pool.
|
169
|
#
|
170
|
# This will allow you to read (and read-only!) those files by using the
|
171
|
# storage pool drives themselves, instead of using the mounted shares.
|
172
|
# To see when that might be useful, read Issue #3 at the URL below.
|
173
|
# [http://code.google.com/p/greyhole/issues/detail?id=3]
|
174
|
#
|
175
|
# Each sticky_files line should start with the name of a share, followed by a
|
176
|
# directory inside that share.
|
177
|
# One or more stick_into lines should follow each sticky_files line, if you
|
178
|
# want the files to go on specific hard drive(s).
|
179
|
# If you don't specify any stick_into, the drive with the most free space will
|
180
|
# be use to hold your files together.
|
181
|
|
182
|
sticky_files = Music/
|
183
|
|
184
|
# sticky_files = Videos/Movies/
|
185
|
# stick_into = /mnt/hdd1/gh
|
186
|
# stick_into = /mnt/hdd5/gh
|
187
|
|
188
|
# How long should free space calculations be cached (in seconds).
|
189
|
# When selecting drives using their available / free space, the last cached
|
190
|
# value will be used.
|
191
|
# Use 0 to disable caching.
|
192
|
|
193
|
df_cache_time = 15
|
194
|
|
195
|
#### Trash ####
|
196
|
# The Trash (also called Attic or Recycle Bin), is used as a safeguard against
|
197
|
# human or machine errors.
|
198
|
# Greyhole can use the Trash for files that have been deleted and/or modified.
|
199
|
# It is strongly recommended that you keep both settings ON; this will further
|
200
|
# protect your files.
|
201
|
# You can specify per-share preferences that will override the global
|
202
|
# preference.
|
203
|
|
204
|
delete_moves_to_trash = yes
|
205
|
# delete_moves_to_trash[RecordedTV] = no
|
206
|
|
207
|
modified_moves_to_trash = yes
|
208
|
# modified_moves_to_trash[RecordedTV] = no
|
209
|
|
210
|
#### Frozen directories ####
|
211
|
# Directories listed below will not be touched by Greyhole until the user
|
212
|
# wants it to (greyhole --thaw=<dir>).
|
213
|
#
|
214
|
# This can be used to process often-updated files at regular intervals,
|
215
|
# instead of having Greyhole process them as soon as they change.
|
216
|
#
|
217
|
# Each frozen_directory line should start with the name of a share, followed
|
218
|
# by a directory inside that share.
|
219
|
|
220
|
# frozen_directory = Data/mysql
|
221
|
|
222
|
#### Maximum Queued Tasks ####
|
223
|
# Maximum number of queued tasks to store in MySQL, when parsing the
|
224
|
# spool directory. Use a lower number if you experience slowness while parsing
|
225
|
# spooled operations.
|
226
|
# Default is 10000000.
|
227
|
# Setting a value here will overwrite those defaults.
|
228
|
|
229
|
# max_queued_tasks = 10000000
|
230
|
|
231
|
#### Memory Limit ###
|
232
|
## Maximum amount of ram that Greyhole can consume while running
|
233
|
## this can be higher than the global php.ini memory limit
|
234
|
## if greyhole uses >95% of available memory while loading
|
235
|
## data it will quit and throw an error in the logs
|
236
|
# Default is 512M
|
237
|
# Setting a value here will overwrite this default.
|
238
|
# It is NOT advisable to lower the memory limit.
|
239
|
# memory_limit = 512M
|
240
|
|
241
|
#### Executed tasks retention ####
|
242
|
# How long should executed tasks be kept in the database, after having been executed.
|
243
|
# Those are strictly for debugging purposes; they serve no other purposes.
|
244
|
# Enter a number of days, or 'forever' (no quotes).
|
245
|
# The default is to keep 60 days.
|
246
|
|
247
|
# executed_tasks_retention = 60
|
248
|
|
249
|
#### Ignored files & folders ####
|
250
|
# Files that match the patterns below will be ignored by Greyhole.
|
251
|
# They will stay in the landing zone indefinitely, so be careful on what you
|
252
|
# define here. List here all files and folders that are temporary, to prevent
|
253
|
# Greyhole from working for nothing.
|
254
|
#
|
255
|
# Format is Regular Expressions (PCRE syntax)
|
256
|
#
|
257
|
# ignored_files is matched against the file name only.
|
258
|
# ignored_folders is matched against the concatenation of the share name and
|
259
|
# the full path to the file (without the filename), eg: Videos/Movies/HD/
|
260
|
|
261
|
# rsync temporary files
|
262
|
ignored_files = \..*\.[0-9a-zA-Z]{6}
|
263
|
# Microsoft Office temporary files
|
264
|
ignored_files = [0-9A-F]{8}\.tmp
|
265
|
# CrashPlan (restore) temporary files
|
266
|
ignored_files = \.cprestoretmp.*
|
267
|
# SABnzbd temporary folders when extracting a download
|
268
|
ignored_folders = .*/_UNPACK_.*
|
269
|
# NZBget temporary folders when extracting a download
|
270
|
ignored_folders = .*/_unpack.*
|
271
|
# Plex Optimized Versions temporary files
|
272
|
ignored_folders = .*/inProgress/.*
|
273
|
# Mac metadata files
|
274
|
ignored_files = \.DS_Store
|
275
|
# Windows thumbs database files
|
276
|
#ignored_files = Thumb.db
|
277
|
|
278
|
#### Hooks ####
|
279
|
# Call custom scripts on events.
|
280
|
#
|
281
|
# Available events type: create, edit, rename, delete, mkdir, rmdir, warning, error, critical, fsck, idle, not_idle
|
282
|
# - For create, edit, rename, delete, mkdir, and rmdir: the hooks are called after Greyhole finished processing the operation;
|
283
|
# - for warning, error, critical and fsck: the hooks are called after Greyhole created a log;
|
284
|
# - for idle and not_idle: the hooks are called just before the daemon will sleep, or when it's about to start working again.
|
285
|
#
|
286
|
# The parameters sent to the custom scripts are:
|
287
|
# - event_type (one of the above)
|
288
|
# If event is related to a file/folder on a share (create, edit, rename, delete, mkdir and rmdir), other params will be:
|
289
|
# - share_name
|
290
|
# - path_on_share
|
291
|
# - original_path_on_share (only for rename)
|
292
|
# If event is related to a log (warning, error, critical, fsck, idle and not_idle), other params will be:
|
293
|
# - event_code: one of the predefined values that define the actual error/event.
|
294
|
# Look here for the list of possible codes: https://github.com/gboudreau/Greyhole/blob/master/includes/Log.php#L62
|
295
|
# - log: user-readable log (might contain LF characters)
|
296
|
#
|
297
|
# hook[create|edit|rename|delete|mkdir|rmdir] = /usr/share/greyhole/scripts-examples/greyhole_file_changed.sh
|
298
|
# hook[warning|error|critical] = /usr/share/greyhole/scripts-examples/greyhole_notify_error.sh
|
299
|
# hook[fsck] = /usr/share/greyhole/scripts-examples/greyhole_send_fsck_report.sh
|
300
|
# hook[idle|not_idle] = /usr/share/greyhole/scripts-examples/greyhole_idle.sh
|