1 #============================================================= -*-perl-*-
3 # BackupPC::Config::Meta package
7 # This library defines a BackupPC::Config::Meta class.
10 # Craig Barratt <cbarratt@users.sourceforge.net>
13 # Copyright (C) 2004 Craig Barratt
15 # This program is free software; you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation; either version 2 of the License, or
18 # (at your option) any later version.
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #========================================================================
31 # Version 2.1.0, released 20 Jun 2004.
33 # See http://backuppc.sourceforge.net.
35 #========================================================================
37 package BackupPC::Config::Meta;
43 use vars qw( @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS );
45 use vars qw(%ConfigMeta);
56 'all' => [ @EXPORT_OK ],
60 # Define the data types for all the config variables
65 ######################################################################
66 # General server configuration
67 ######################################################################
68 ServerHost => "string",
69 ServerPort => "integer",
70 ServerMesgSecret => "string",
71 MyPath => {type => "string", undefIfEmpty => 1},
72 UmaskMode => "integer",
77 MaxBackups => "integer",
78 MaxUserBackups => "integer",
79 MaxPendingCmds => "integer",
80 MaxBackupPCNightlyJobs => "integer",
81 BackupPCNightlyPeriod => "integer",
82 MaxOldLogFiles => "integer",
84 SshPath => {type => "string", undefIfEmpty => 1},
85 NmbLookupPath => {type => "string", undefIfEmpty => 1},
86 PingPath => {type => "string", undefIfEmpty => 1},
87 DfPath => {type => "string", undefIfEmpty => 1},
89 SplitPath => {type => "string", undefIfEmpty => 1},
90 ParPath => {type => "string", undefIfEmpty => 1},
91 CatPath => {type => "string", undefIfEmpty => 1},
92 GzipPath => {type => "string", undefIfEmpty => 1},
93 Bzip2Path => {type => "string", undefIfEmpty => 1},
94 DfMaxUsagePct => "float",
95 TrashCleanSleepSec => "integer",
96 DHCPAddressRanges => {
103 ipAddrBase => "string",
109 BackupPCUser => "string",
111 InstallDir => "string",
112 BackupPCUserVerify => "integer",
113 HardLinkMax => "integer",
120 ServerInitdPath => {type => "string", undefIfEmpty => 1},
121 ServerInitdStartCmd => "string",
123 ######################################################################
124 # What to backup and when to do it
125 # (can be overridden in the per-PC config.pl)
126 ######################################################################
127 FullPeriod => "float",
128 IncrPeriod => "float",
133 FullKeepCntMin => "integer",
134 FullAgeMax => "float",
135 IncrKeepCnt => "integer",
136 IncrKeepCntMin => "integer",
137 IncrAgeMax => "float",
138 PartialAgeMax => "float",
139 IncrFill => "integer",
140 RestoreInfoKeepCnt => "integer",
141 ArchiveInfoKeepCnt => "integer",
149 BackupFilesExclude => {
156 BlackoutBadPingLimit => "integer",
157 BlackoutGoodCnt => "integer",
165 hourBegin => "float",
175 BackupZeroFilesIsFatal => "integer",
177 ######################################################################
178 # How to backup a client
179 ######################################################################
182 values => [qw(archive rsync rsyncd smb tar)],
184 XferLogLevel => "integer",
190 SmbShareUserName => "string",
191 SmbSharePasswd => "string",
192 SmbClientPath => {type => "string", undefIfEmpty => 1},
193 SmbClientFullCmd => "string",
194 SmbClientIncrCmd => "string",
195 SmbClientRestoreCmd => "string",
201 TarClientCmd => "string",
202 TarFullArgs => "string",
203 TarIncrArgs => "string",
204 TarClientRestoreCmd => "string",
205 TarClientPath => {type => "string", undefIfEmpty => 1},
211 RsyncClientPath => {type => "string", undefIfEmpty => 1},
212 RsyncClientCmd => "string",
213 RsyncClientRestoreCmd => "string",
215 RsyncdClientPort => "integer",
216 RsyncdPasswd => "string",
217 RsyncdAuthRequired => "integer",
219 RsyncCsumCacheVerifyProb => "float",
225 RsyncRestoreArgs => {
231 ArchiveDest => "string",
234 values => [qw(none bzip2 gzip)],
236 ArchivePar => "integer",
237 ArchiveSplit => "float",
238 ArchiveClientCmd => "string",
240 NmbLookupCmd => "string",
241 NmbLookupFindHostCmd => "string",
243 FixedIPNetBiosNameCheck => "integer",
245 PingMaxMsec => "float",
247 ClientTimeout => "integer",
249 MaxOldPerPCLogFiles => "integer",
251 CompressLevel => "integer",
253 DumpPreUserCmd => {type => "string", undefIfEmpty => 1},
254 DumpPostUserCmd => {type => "string", undefIfEmpty => 1},
255 DumpPreShareCmd => {type => "string", undefIfEmpty => 1},
256 DumpPostShareCmd => {type => "string", undefIfEmpty => 1},
257 RestorePreUserCmd => {type => "string", undefIfEmpty => 1},
258 RestorePostUserCmd => {type => "string", undefIfEmpty => 1},
259 ArchivePreUserCmd => {type => "string", undefIfEmpty => 1},
260 ArchivePostUserCmd => {type => "string", undefIfEmpty => 1},
262 ClientNameAlias => {type => "string", undefIfEmpty => 1},
264 ######################################################################
265 # Email reminders, status and messages
266 # (can be overridden in the per-PC config.pl)
267 ######################################################################
268 SendmailPath => {type => "string", undefIfEmpty => 1},
269 EMailNotifyMinDays => "float",
270 EMailFromUserName => "string",
271 EMailAdminUserName => "string",
272 EMailUserDestDomain => "string",
273 EMailNoBackupEverSubj => {type => "string", undefIfEmpty => 1},
274 EMailNoBackupEverMesg => {type => "bigstring", undefIfEmpty => 1},
275 EMailNotifyOldBackupDays => "float",
276 EMailNoBackupRecentSubj => {type => "string", undefIfEmpty => 1},
277 EMailNoBackupRecentMesg => {type => "bigstring", undefIfEmpty => 1},
278 EMailNotifyOldOutlookDays => "float",
279 EMailOutlookBackupSubj => {type => "string", undefIfEmpty => 1},
280 EMailOutlookBackupMesg => {type => "bigstring", undefIfEmpty => 1},
282 ######################################################################
283 # CGI user interface configuration settings
284 ######################################################################
285 CgiAdminUserGroup => "string",
286 CgiAdminUsers => "string",
288 Language => "string",
289 CgiUserHomePageCheck => "string",
290 CgiUserUrlCreate => "string",
291 CgiDateFormatMMDD => "integer",
292 CgiNavBarAdminAllHosts => "integer",
293 CgiSearchBoxEnable => "integer",
302 lname => {type => "string", undefIfEmpty => 1},
303 name => {type => "string", undefIfEmpty => 1},
307 CgiStatusHilightColor => {
311 Reason_backup_failed => "string",
312 Reason_backup_done => "string",
313 Reason_no_ping => "string",
314 Reason_backup_canceled_by_user => "string",
315 Status_backup_in_progress => "string",
318 CgiHeaders => "bigstring",
319 CgiImageDir => "string",
320 CgiExt2ContentType => {
323 childType => "string",
325 CgiImageDirURL => "string",
326 CgiCSSFile => "string",
327 CgiUserConfigEdit => {
331 FullPeriod => "boolean",
332 IncrPeriod => "boolean",
333 FullKeepCnt => "boolean",
334 FullKeepCntMin => "boolean",
335 FullAgeMax => "boolean",
336 IncrKeepCnt => "boolean",
337 IncrKeepCntMin => "boolean",
338 IncrAgeMax => "boolean",
339 PartialAgeMax => "boolean",
340 IncrFill => "boolean",
341 RestoreInfoKeepCnt => "boolean",
342 ArchiveInfoKeepCnt => "boolean",
343 BackupFilesOnly => "boolean",
344 BackupFilesExclude => "boolean",
345 BlackoutBadPingLimit => "boolean",
346 BlackoutGoodCnt => "boolean",
347 BlackoutPeriods => "boolean",
348 BackupZeroFilesIsFatal => "boolean",
349 XferMethod => "boolean",
350 XferLogLevel => "boolean",
351 SmbShareName => "boolean",
352 SmbShareUserName => "boolean",
353 SmbSharePasswd => "boolean",
354 TarShareName => "boolean",
355 TarFullArgs => "boolean",
356 TarIncrArgs => "boolean",
357 RsyncShareName => "boolean",
358 RsyncdClientPort => "boolean",
359 RsyncdPasswd => "boolean",
360 RsyncdAuthRequired => "boolean",
361 RsyncCsumCacheVerifyProb => "boolean",
362 RsyncArgs => "boolean",
363 RsyncRestoreArgs => "boolean",
364 ArchiveDest => "boolean",
365 ArchiveComp => "boolean",
366 ArchivePar => "boolean",
367 ArchiveSplit => "boolean",
368 FixedIPNetBiosNameCheck => "boolean",
369 PingMaxMsec => "boolean",
370 ClientTimeout => "boolean",
371 MaxOldPerPCLogFiles => "boolean",
372 CompressLevel => "boolean",
373 ClientNameAlias => "boolean",
374 EMailNotifyMinDays => "boolean",
375 EMailFromUserName => "boolean",
376 EMailAdminUserName => "boolean",
377 EMailUserDestDomain => "boolean",
378 EMailNoBackupEverSubj => "boolean",
379 EMailNoBackupEverMesg => "boolean",
380 EMailNotifyOldBackupDays => "boolean",
381 EMailNoBackupRecentSubj => "boolean",
382 EMailNoBackupRecentMesg => "boolean",
383 EMailNotifyOldOutlookDays => "boolean",
384 EMailOutlookBackupSubj => "boolean",
385 EMailOutlookBackupMesg => "boolean",