config.pl 81 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280
  1. #============================================================= -*-perl-*-
  2. #
  3. # Configuration file for BackupPC.
  4. #
  5. # DESCRIPTION
  6. #
  7. # This is the main configuration file for BackupPC.
  8. #
  9. # This file must be valid perl source, so make sure the punctuation,
  10. # quotes, and other syntax are valid.
  11. #
  12. # This file is read by BackupPC at startup, when a HUP (-1) signal
  13. # is sent to BackupPC and also at each wakeup time whenever the
  14. # modification time of this file changes.
  15. #
  16. # The configuration parameters are divided into four general groups.
  17. # The first group (general server configuration) provides general
  18. # configuration for BackupPC. The next two groups describe what
  19. # to backup, when to do it, and how long to keep it. The fourth
  20. # group are settings for the CGI http interface.
  21. #
  22. # Configuration settings can also be specified on a per-PC basis.
  23. # Simply put the relevant settings in a config.pl file in the
  24. # PC's backup directory (ie: in __TOPDIR__/pc/hostName).
  25. # All configuration settings in the second, third and fourth
  26. # groups can be overridden by the per-PC config.pl file.
  27. #
  28. # AUTHOR
  29. # Craig Barratt <cbarratt@users.sourceforge.net>
  30. #
  31. # COPYRIGHT
  32. # Copyright (C) 2001-2009 Craig Barratt
  33. #
  34. # See http://backuppc.sourceforge.net.
  35. #
  36. #========================================================================
  37. ###########################################################################
  38. # General server configuration
  39. ###########################################################################
  40. #
  41. # Host name on which the BackupPC server is running.
  42. #
  43. $ENV{'PATH'} = '/bin:/usr/bin';
  44. delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
  45. $Conf{ServerHost} = 'storageblock';
  46. chomp($Conf{ServerHost});
  47. #
  48. # TCP port number on which the BackupPC server listens for and accepts
  49. # connections. Normally this should be disabled (set to -1). The TCP
  50. # port is only needed if apache runs on a different machine from BackupPC.
  51. # In that case, set this to any spare port number over 1024 (eg: 2359).
  52. # If you enable the TCP port, make sure you set $Conf{ServerMesgSecret}
  53. # too!
  54. #
  55. $Conf{ServerPort} = -1;
  56. #
  57. # Shared secret to make the TCP port secure. Set this to a hard to guess
  58. # string if you enable the TCP port (ie: $Conf{ServerPort} > 0).
  59. #
  60. # To avoid possible attacks via the TCP socket interface, every client
  61. # message is protected by an MD5 digest. The MD5 digest includes four
  62. # items:
  63. # - a seed that is sent to the client when the connection opens
  64. # - a sequence number that increments for each message
  65. # - a shared secret that is stored in $Conf{ServerMesgSecret}
  66. # - the message itself.
  67. #
  68. # The message is sent in plain text preceded by the MD5 digest. A
  69. # snooper can see the plain-text seed sent by BackupPC and plain-text
  70. # message from the client, but cannot construct a valid MD5 digest since
  71. # the secret $Conf{ServerMesgSecret} is unknown. A replay attack is
  72. # not possible since the seed changes on a per-connection and
  73. # per-message basis.
  74. #
  75. $Conf{ServerMesgSecret} = '';
  76. #
  77. # PATH setting for BackupPC. An explicit value is necessary
  78. # for taint mode. Value shouldn't matter too much since
  79. # all execs use explicit paths. However, taint mode in perl
  80. # will complain if this directory is world writable.
  81. #
  82. $Conf{MyPath} = '/bin';
  83. #
  84. # Permission mask for directories and files created by BackupPC.
  85. # Default value prevents any access from group other, and prevents
  86. # group write.
  87. #
  88. $Conf{UmaskMode} = 23;
  89. #
  90. # Times at which we wake up, check all the PCs, and schedule necessary
  91. # backups. Times are measured in hours since midnight. Can be
  92. # fractional if necessary (eg: 4.25 means 4:15am).
  93. #
  94. # If the hosts you are backing up are always connected to the network
  95. # you might have only one or two wakeups each night. This will keep
  96. # the backup activity after hours. On the other hand, if you are backing
  97. # up laptops that are only intermittently connected to the network you
  98. # will want to have frequent wakeups (eg: hourly) to maximize the chance
  99. # that each laptop is backed up.
  100. #
  101. # Examples:
  102. # $Conf{WakeupSchedule} = [22.5]; # once per day at 10:30 pm.
  103. # $Conf{WakeupSchedule} = [2,4,6,8,10,12,14,16,18,20,22]; # every 2 hours
  104. #
  105. # The default value is every hour except midnight.
  106. #
  107. # The first entry of $Conf{WakeupSchedule} is when BackupPC_nightly is run.
  108. # You might want to re-arrange the entries in $Conf{WakeupSchedule}
  109. # (they don't have to be ascending) so that the first entry is when
  110. # you want BackupPC_nightly to run (eg: when you don't expect a lot
  111. # of regular backups to run).
  112. #
  113. $Conf{WakeupSchedule} = [
  114. 1,
  115. 2,
  116. 3,
  117. 4,
  118. 5,
  119. 6,
  120. 7,
  121. 8,
  122. 9,
  123. 10,
  124. 11,
  125. 12,
  126. 13,
  127. 14,
  128. 15,
  129. 16,
  130. 17,
  131. 18,
  132. 19,
  133. 20,
  134. 21,
  135. 22,
  136. 23
  137. ];
  138. #
  139. # Maximum number of simultaneous backups to run. If there
  140. # are no user backup requests then this is the maximum number
  141. # of simultaneous backups.
  142. #
  143. $Conf{MaxBackups} = 2;
  144. #
  145. # Additional number of simultaneous backups that users can run.
  146. # As many as $Conf{MaxBackups} + $Conf{MaxUserBackups} requests can
  147. # run at the same time.
  148. #
  149. $Conf{MaxUserBackups} = 4;
  150. #
  151. # Maximum number of pending link commands. New backups will only be
  152. # started if there are no more than $Conf{MaxPendingCmds} plus
  153. # $Conf{MaxBackups} number of pending link commands, plus running jobs.
  154. # This limit is to make sure BackupPC doesn't fall too far behind in
  155. # running BackupPC_link commands.
  156. #
  157. $Conf{MaxPendingCmds} = 15;
  158. #
  159. # Nice level at which CmdQueue commands (eg: BackupPC_link and
  160. # BackupPC_nightly) are run at.
  161. #
  162. $Conf{CmdQueueNice} = 10;
  163. #
  164. # How many BackupPC_nightly processes to run in parallel.
  165. #
  166. # Each night, at the first wakeup listed in $Conf{WakeupSchedule},
  167. # BackupPC_nightly is run. Its job is to remove unneeded files
  168. # in the pool, ie: files that only have one link. To avoid race
  169. # conditions, BackupPC_nightly and BackupPC_link cannot run at
  170. # the same time. Starting in v3.0.0, BackupPC_nightly can run
  171. # concurrently with backups (BackupPC_dump).
  172. #
  173. # So to reduce the elapsed time, you might want to increase this
  174. # setting to run several BackupPC_nightly processes in parallel
  175. # (eg: 4, or even 8).
  176. #
  177. $Conf{MaxBackupPCNightlyJobs} = 2;
  178. #
  179. # How many days (runs) it takes BackupPC_nightly to traverse the
  180. # entire pool. Normally this is 1, which means every night it runs,
  181. # it does traverse the entire pool removing unused pool files.
  182. #
  183. # Other valid values are 2, 4, 8, 16. This causes BackupPC_nightly to
  184. # traverse 1/2, 1/4, 1/8 or 1/16th of the pool each night, meaning it
  185. # takes 2, 4, 8 or 16 days to completely traverse the pool. The
  186. # advantage is that each night the running time of BackupPC_nightly
  187. # is reduced roughly in proportion, since the total job is split
  188. # over multiple days. The disadvantage is that unused pool files
  189. # take longer to get deleted, which will slightly increase disk
  190. # usage.
  191. #
  192. # Note that even when $Conf{BackupPCNightlyPeriod} > 1, BackupPC_nightly
  193. # still runs every night. It just does less work each time it runs.
  194. #
  195. # Examples:
  196. #
  197. # $Conf{BackupPCNightlyPeriod} = 1; # entire pool is checked every night
  198. #
  199. # $Conf{BackupPCNightlyPeriod} = 2; # two days to complete pool check
  200. # # (different half each night)
  201. #
  202. # $Conf{BackupPCNightlyPeriod} = 4; # four days to complete pool check
  203. # # (different quarter each night)
  204. #
  205. $Conf{BackupPCNightlyPeriod} = 1;
  206. #
  207. # Maximum number of log files we keep around in log directory.
  208. # These files are aged nightly. A setting of 14 means the log
  209. # directory will contain about 2 weeks of old log files, in
  210. # particular at most the files LOG, LOG.0, LOG.1, ... LOG.13
  211. # (except today's LOG, these files will have a .z extension if
  212. # compression is on).
  213. #
  214. # If you decrease this number after BackupPC has been running for a
  215. # while you will have to manually remove the older log files.
  216. #
  217. $Conf{MaxOldLogFiles} = 14;
  218. #
  219. # Full path to the df command. Security caution: normal users
  220. # should not allowed to write to this file or directory.
  221. #
  222. $Conf{DfPath} = '/bin/df';
  223. #
  224. # Command to run df. The following variables are substituted at run-time:
  225. #
  226. # $dfPath path to df ($Conf{DfPath})
  227. # $topDir top-level BackupPC data directory
  228. #
  229. # Note: all Cmds are executed directly without a shell, so the prog name
  230. # needs to be a full path and you can't include shell syntax like
  231. # redirection and pipes; put that in a script if you need it.
  232. #
  233. $Conf{DfCmd} = '$dfPath $topDir';
  234. #
  235. # Full path to various commands for archiving
  236. #
  237. $Conf{SplitPath} = '/usr/bin/split';
  238. $Conf{ParPath} = '/usr/bin/par2';
  239. $Conf{CatPath} = '/bin/cat';
  240. $Conf{GzipPath} = '/bin/gzip';
  241. $Conf{Bzip2Path} = '/bin/bzip2';
  242. #
  243. # Maximum threshold for disk utilization on the __TOPDIR__ filesystem.
  244. # If the output from $Conf{DfPath} reports a percentage larger than
  245. # this number then no new regularly scheduled backups will be run.
  246. # However, user requested backups (which are usually incremental and
  247. # tend to be small) are still performed, independent of disk usage.
  248. # Also, currently running backups will not be terminated when the disk
  249. # usage exceeds this number.
  250. #
  251. $Conf{DfMaxUsagePct} = 95;
  252. #
  253. # How long BackupPC_trashClean sleeps in seconds between each check
  254. # of the trash directory. Once every 5 minutes should be reasonable.
  255. #
  256. $Conf{TrashCleanSleepSec} = 300;
  257. #
  258. # List of DHCP address ranges we search looking for PCs to backup.
  259. # This is an array of hashes for each class C address range.
  260. # This is only needed if hosts in the conf/hosts file have the
  261. # dhcp flag set.
  262. #
  263. # Examples:
  264. # # to specify 192.10.10.20 to 192.10.10.250 as the DHCP address pool
  265. # $Conf{DHCPAddressRanges} = [
  266. # {
  267. # ipAddrBase => '192.10.10',
  268. # first => 20,
  269. # last => 250,
  270. # },
  271. # ];
  272. # # to specify two pools (192.10.10.20-250 and 192.10.11.10-50)
  273. # $Conf{DHCPAddressRanges} = [
  274. # {
  275. # ipAddrBase => '192.10.10',
  276. # first => 20,
  277. # last => 250,
  278. # },
  279. # {
  280. # ipAddrBase => '192.10.11',
  281. # first => 10,
  282. # last => 50,
  283. # },
  284. # ];
  285. #
  286. $Conf{DHCPAddressRanges} = [];
  287. #
  288. # The BackupPC user.
  289. #
  290. $Conf{BackupPCUser} = 'backuppc';
  291. #
  292. # Important installation directories:
  293. #
  294. # TopDir - where all the backup data is stored
  295. # ConfDir - where the main config and hosts files resides
  296. # LogDir - where log files and other transient information
  297. # InstallDir - where the bin, lib and doc installation dirs reside.
  298. # Note: you cannot change this value since all the
  299. # perl scripts include this path. You must reinstall
  300. # with configure.pl to change InstallDir.
  301. # CgiDir - Apache CGI directory for BackupPC_Admin
  302. #
  303. # Note: it is STRONGLY recommended that you don't change the
  304. # values here. These are set at installation time and are here
  305. # for reference and are used during upgrades.
  306. #
  307. # Instead of changing TopDir here it is recommended that you use
  308. # a symbolic link to the new location, or mount the new BackupPC
  309. # store at the existing $Conf{TopDir} setting.
  310. #
  311. $Conf{TopDir} = '/var/lib/backuppc';
  312. $Conf{ConfDir} = '/etc/backuppc';
  313. $Conf{LogDir} = '/var/lib/backuppc/log';
  314. $Conf{InstallDir} = '/usr/share/backuppc';
  315. $Conf{CgiDir} = '/usr/share/backuppc/cgi-bin';
  316. #
  317. # Whether BackupPC and the CGI script BackupPC_Admin verify that they
  318. # are really running as user $Conf{BackupPCUser}. If this flag is set
  319. # and the effective user id (euid) differs from $Conf{BackupPCUser}
  320. # then both scripts exit with an error. This catches cases where
  321. # BackupPC might be accidently started as root or the wrong user,
  322. # or if the CGI script is not installed correctly.
  323. #
  324. $Conf{BackupPCUserVerify} = '1';
  325. #
  326. # Maximum number of hardlinks supported by the $TopDir file system
  327. # that BackupPC uses. Most linux or unix file systems should support
  328. # at least 32000 hardlinks per file, or 64000 in other cases. If a pool
  329. # file already has this number of hardlinks, a new pool file is created
  330. # so that new hardlinks can be accommodated. This limit will only
  331. # be hit if an identical file appears at least this number of times
  332. # across all the backups.
  333. #
  334. $Conf{HardLinkMax} = 31999;
  335. #
  336. # Advanced option for asking BackupPC to load additional perl modules.
  337. # Can be a list (array ref) of module names to load at startup.
  338. #
  339. $Conf{PerlModuleLoad} = undef;
  340. #
  341. # Path to init.d script and command to use that script to start the
  342. # server from the CGI interface. The following variables are substituted
  343. # at run-time:
  344. #
  345. # $sshPath path to ssh ($Conf{SshPath})
  346. # $serverHost same as $Conf{ServerHost}
  347. # $serverInitdPath path to init.d script ($Conf{ServerInitdPath})
  348. #
  349. # Example:
  350. #
  351. # $Conf{ServerInitdPath} = '/etc/init.d/backuppc';
  352. # $Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost'
  353. # . ' $serverInitdPath start'
  354. # . ' < /dev/null >& /dev/null';
  355. #
  356. # Note: all Cmds are executed directly without a shell, so the prog name
  357. # needs to be a full path and you can't include shell syntax like
  358. # redirection and pipes; put that in a script if you need it.
  359. #
  360. $Conf{ServerInitdPath} = undef;
  361. $Conf{ServerInitdStartCmd} = '';
  362. ###########################################################################
  363. # What to backup and when to do it
  364. # (can be overridden in the per-PC config.pl)
  365. ###########################################################################
  366. #
  367. # Minimum period in days between full backups. A full dump will only be
  368. # done if at least this much time has elapsed since the last full dump,
  369. # and at least $Conf{IncrPeriod} days has elapsed since the last
  370. # successful dump.
  371. #
  372. # Typically this is set slightly less than an integer number of days. The
  373. # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
  374. # will make the actual backup interval a bit longer.
  375. #
  376. $Conf{FullPeriod} = '6.97';
  377. #
  378. # Minimum period in days between incremental backups (a user requested
  379. # incremental backup will be done anytime on demand).
  380. #
  381. # Typically this is set slightly less than an integer number of days. The
  382. # time taken for the backup, plus the granularity of $Conf{WakeupSchedule}
  383. # will make the actual backup interval a bit longer.
  384. #
  385. $Conf{IncrPeriod} = '0.97';
  386. #
  387. # Number of full backups to keep. Must be >= 1.
  388. #
  389. # In the steady state, each time a full backup completes successfully
  390. # the oldest one is removed. If this number is decreased, the
  391. # extra old backups will be removed.
  392. #
  393. # If filling of incremental dumps is off the oldest backup always
  394. # has to be a full (ie: filled) dump. This might mean one or two
  395. # extra full dumps are kept until the oldest incremental backups expire.
  396. #
  397. # Exponential backup expiry is also supported. This allows you to specify:
  398. #
  399. # - num fulls to keep at intervals of 1 * $Conf{FullPeriod}, followed by
  400. # - num fulls to keep at intervals of 2 * $Conf{FullPeriod},
  401. # - num fulls to keep at intervals of 4 * $Conf{FullPeriod},
  402. # - num fulls to keep at intervals of 8 * $Conf{FullPeriod},
  403. # - num fulls to keep at intervals of 16 * $Conf{FullPeriod},
  404. #
  405. # and so on. This works by deleting every other full as each expiry
  406. # boundary is crossed.
  407. #
  408. # Exponential expiry is specified using an array for $Conf{FullKeepCnt}:
  409. #
  410. # $Conf{FullKeepCnt} = [4, 2, 3];
  411. #
  412. # Entry #n specifies how many fulls to keep at an interval of
  413. # 2^n * $Conf{FullPeriod} (ie: 1, 2, 4, 8, 16, 32, ...).
  414. #
  415. # The example above specifies keeping 4 of the most recent full backups
  416. # (1 week interval) two full backups at 2 week intervals, and 3 full
  417. # backups at 4 week intervals, eg:
  418. #
  419. # full 0 19 weeks old \
  420. # full 1 15 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
  421. # full 2 11 weeks old /
  422. # full 3 7 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
  423. # full 4 5 weeks old /
  424. # full 5 3 weeks old \
  425. # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
  426. # full 7 1 week old /
  427. # full 8 current /
  428. #
  429. # On a given week the spacing might be less than shown as each backup
  430. # ages through each expiry period. For example, one week later, a
  431. # new full is completed and the oldest is deleted, giving:
  432. #
  433. # full 0 16 weeks old \
  434. # full 1 12 weeks old >--- 3 backups at 4 * $Conf{FullPeriod}
  435. # full 2 8 weeks old /
  436. # full 3 6 weeks old \____ 2 backups at 2 * $Conf{FullPeriod}
  437. # full 4 4 weeks old /
  438. # full 5 3 weeks old \
  439. # full 6 2 weeks old \___ 4 backups at 1 * $Conf{FullPeriod}
  440. # full 7 1 week old /
  441. # full 8 current /
  442. #
  443. # You can specify 0 as a count (except in the first entry), and the
  444. # array can be as long as you wish. For example:
  445. #
  446. # $Conf{FullKeepCnt} = [4, 0, 4, 0, 0, 2];
  447. #
  448. # This will keep 10 full dumps, 4 most recent at 1 * $Conf{FullPeriod},
  449. # followed by 4 at an interval of 4 * $Conf{FullPeriod} (approx 1 month
  450. # apart), and then 2 at an interval of 32 * $Conf{FullPeriod} (approx
  451. # 7-8 months apart).
  452. #
  453. # Example: these two settings are equivalent and both keep just
  454. # the four most recent full dumps:
  455. #
  456. # $Conf{FullKeepCnt} = 4;
  457. # $Conf{FullKeepCnt} = [4];
  458. #
  459. $Conf{FullKeepCnt} = [
  460. 1
  461. ];
  462. #
  463. # Very old full backups are removed after $Conf{FullAgeMax} days. However,
  464. # we keep at least $Conf{FullKeepCntMin} full backups no matter how old
  465. # they are.
  466. #
  467. # Note that $Conf{FullAgeMax} will be increased to $Conf{FullKeepCnt}
  468. # times $Conf{FullPeriod} if $Conf{FullKeepCnt} specifies enough
  469. # full backups to exceed $Conf{FullAgeMax}.
  470. #
  471. $Conf{FullKeepCntMin} = 1;
  472. $Conf{FullAgeMax} = 90;
  473. #
  474. # Number of incremental backups to keep. Must be >= 1.
  475. #
  476. # In the steady state, each time an incr backup completes successfully
  477. # the oldest one is removed. If this number is decreased, the
  478. # extra old backups will be removed.
  479. #
  480. $Conf{IncrKeepCnt} = 6;
  481. #
  482. # Very old incremental backups are removed after $Conf{IncrAgeMax} days.
  483. # However, we keep at least $Conf{IncrKeepCntMin} incremental backups no
  484. # matter how old they are.
  485. #
  486. $Conf{IncrKeepCntMin} = 1;
  487. $Conf{IncrAgeMax} = 30;
  488. #
  489. # Level of each incremental. "Level" follows the terminology
  490. # of dump(1). A full backup has level 0. A new incremental
  491. # of level N will backup all files that have changed since
  492. # the most recent backup of a lower level.
  493. #
  494. # The entries of $Conf{IncrLevels} apply in order to each
  495. # incremental after each full backup. It wraps around until
  496. # the next full backup. For example, these two settings
  497. # have the same effect:
  498. #
  499. # $Conf{IncrLevels} = [1, 2, 3];
  500. # $Conf{IncrLevels} = [1, 2, 3, 1, 2, 3];
  501. #
  502. # This means the 1st and 4th incrementals (level 1) go all
  503. # the way back to the full. The 2nd and 3rd (and 5th and
  504. # 6th) backups just go back to the immediate preceeding
  505. # incremental.
  506. #
  507. # Specifying a sequence of multi-level incrementals will
  508. # usually mean more than $Conf{IncrKeepCnt} incrementals will
  509. # need to be kept, since lower level incrementals are needed
  510. # to merge a complete view of a backup. For example, with
  511. #
  512. # $Conf{FullPeriod} = 7;
  513. # $Conf{IncrPeriod} = 1;
  514. # $Conf{IncrKeepCnt} = 6;
  515. # $Conf{IncrLevels} = [1, 2, 3, 4, 5, 6];
  516. #
  517. # there will be up to 11 incrementals in this case:
  518. #
  519. # backup #0 (full, level 0, oldest)
  520. # backup #1 (incr, level 1)
  521. # backup #2 (incr, level 2)
  522. # backup #3 (incr, level 3)
  523. # backup #4 (incr, level 4)
  524. # backup #5 (incr, level 5)
  525. # backup #6 (incr, level 6)
  526. # backup #7 (full, level 0)
  527. # backup #8 (incr, level 1)
  528. # backup #9 (incr, level 2)
  529. # backup #10 (incr, level 3)
  530. # backup #11 (incr, level 4)
  531. # backup #12 (incr, level 5, newest)
  532. #
  533. # Backup #1 (the oldest level 1 incremental) can't be deleted
  534. # since backups 2..6 depend on it. Those 6 incrementals can't
  535. # all be deleted since that would only leave 5 (#8..12).
  536. # When the next incremental happens (level 6), the complete
  537. # set of 6 older incrementals (#1..6) will be deleted, since
  538. # that maintains the required number ($Conf{IncrKeepCnt})
  539. # of incrementals. This situation is reduced if you set
  540. # shorter chains of multi-level incrementals, eg:
  541. #
  542. # $Conf{IncrLevels} = [1, 2, 3];
  543. #
  544. # would only have up to 2 extra incremenals before all 3
  545. # are deleted.
  546. #
  547. # BackupPC as usual merges the full and the sequence
  548. # of incrementals together so each incremental can be
  549. # browsed and restored as though it is a complete backup.
  550. # If you specify a long chain of incrementals then more
  551. # backups need to be merged when browsing, restoring,
  552. # or getting the starting point for rsync backups.
  553. # In the example above (levels 1..6), browing backup
  554. # #6 requires 7 different backups (#0..6) to be merged.
  555. #
  556. # Because of this merging and the additional incrementals
  557. # that need to be kept, it is recommended that some
  558. # level 1 incrementals be included in $Conf{IncrLevels}.
  559. #
  560. # Prior to version 3.0 incrementals were always level 1,
  561. # meaning each incremental backed up all the files that
  562. # changed since the last full.
  563. #
  564. $Conf{IncrLevels} = [
  565. 1
  566. ];
  567. #
  568. # Disable all full and incremental backups. These settings are
  569. # useful for a client that is no longer being backed up
  570. # (eg: a retired machine), but you wish to keep the last
  571. # backups available for browsing or restoring to other machines.
  572. #
  573. # There are three values for $Conf{BackupsDisable}:
  574. #
  575. # 0 Backups are enabled.
  576. #
  577. # 1 Don't do any regular backups on this client. Manually
  578. # requested backups (via the CGI interface) will still occur.
  579. #
  580. # 2 Don't do any backups on this client. Manually requested
  581. # backups (via the CGI interface) will be ignored.
  582. #
  583. # In versions prior to 3.0 Backups were disabled by setting
  584. # $Conf{FullPeriod} to -1 or -2.
  585. #
  586. $Conf{BackupsDisable} = 0;
  587. #
  588. # A failed full backup is saved as a partial backup. The rsync
  589. # XferMethod can take advantage of the partial full when the next
  590. # backup is run. This parameter sets the age of the partial full
  591. # in days: if the partial backup is older than this number of
  592. # days, then rsync will ignore (not use) the partial full when
  593. # the next backup is run. If you set this to a negative value
  594. # then no partials will be saved. If you set this to 0, partials
  595. # will be saved, but will not be used by the next backup.
  596. #
  597. # The default setting of 3 days means that a partial older than
  598. # 3 days is ignored when the next full backup is done.
  599. #
  600. $Conf{PartialAgeMax} = 3;
  601. #
  602. # Whether incremental backups are filled. "Filling" means that the
  603. # most recent full (or filled) dump is merged into the new incremental
  604. # dump using hardlinks. This makes an incremental dump look like a
  605. # full dump. Prior to v1.03 all incremental backups were filled.
  606. # In v1.4.0 and later the default is off.
  607. #
  608. # BackupPC, and the cgi interface in particular, do the right thing on
  609. # un-filled incremental backups. It will correctly display the merged
  610. # incremental backup with the most recent filled backup, giving the
  611. # un-filled incremental backups a filled appearance. That means it
  612. # invisible to the user whether incremental dumps are filled or not.
  613. #
  614. # Filling backups takes a little extra disk space, and it does cost
  615. # some extra disk activity for filling, and later removal. Filling
  616. # is no longer useful, since file mangling and compression doesn't
  617. # make a filled backup very useful. It's likely the filling option
  618. # will be removed from future versions: filling will be delegated to
  619. # the display and extraction of backup data.
  620. #
  621. # If filling is off, BackupPC makes sure that the oldest backup is
  622. # a full, otherwise the following incremental backups will be
  623. # incomplete. This might mean an extra full backup has to be
  624. # kept until the following incremental backups expire.
  625. #
  626. # The default is off. You can turn this on or off at any
  627. # time without affecting existing backups.
  628. #
  629. $Conf{IncrFill} = '0';
  630. #
  631. # Number of restore logs to keep. BackupPC remembers information about
  632. # each restore request. This number per client will be kept around before
  633. # the oldest ones are pruned.
  634. #
  635. # Note: files/dirs delivered via Zip or Tar downloads don't count as
  636. # restores. Only the first restore option (where the files and dirs
  637. # are written to the host) count as restores that are logged.
  638. #
  639. $Conf{RestoreInfoKeepCnt} = 10;
  640. #
  641. # Number of archive logs to keep. BackupPC remembers information
  642. # about each archive request. This number per archive client will
  643. # be kept around before the oldest ones are pruned.
  644. #
  645. $Conf{ArchiveInfoKeepCnt} = 10;
  646. #
  647. # List of directories or files to backup. If this is defined, only these
  648. # directories or files will be backed up.
  649. #
  650. # For Smb, only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
  651. # can be specified per share. If both are set for a particular share, then
  652. # $Conf{BackupFilesOnly} takes precedence and $Conf{BackupFilesExclude}
  653. # is ignored.
  654. #
  655. # This can be set to a string, an array of strings, or, in the case
  656. # of multiple shares, a hash of strings or arrays. A hash is used
  657. # to give a list of directories or files to backup for each share
  658. # (the share name is the key). If this is set to just a string or
  659. # array, and $Conf{SmbShareName} contains multiple share names, then
  660. # the setting is assumed to apply all shares.
  661. #
  662. # If a hash is used, a special key "*" means it applies to all
  663. # shares that don't have a specific entry.
  664. #
  665. # Examples:
  666. # $Conf{BackupFilesOnly} = '/myFiles';
  667. # $Conf{BackupFilesOnly} = ['/myFiles']; # same as first example
  668. # $Conf{BackupFilesOnly} = ['/myFiles', '/important'];
  669. # $Conf{BackupFilesOnly} = {
  670. # 'c' => ['/myFiles', '/important'], # these are for 'c' share
  671. # 'd' => ['/moreFiles', '/archive'], # these are for 'd' share
  672. # };
  673. # $Conf{BackupFilesOnly} = {
  674. # 'c' => ['/myFiles', '/important'], # these are for 'c' share
  675. # '*' => ['/myFiles', '/important'], # these are other shares
  676. # };
  677. #
  678. $Conf{BackupFilesOnly} = {};
  679. #
  680. # List of directories or files to exclude from the backup. For Smb,
  681. # only one of $Conf{BackupFilesExclude} and $Conf{BackupFilesOnly}
  682. # can be specified per share. If both are set for a particular share,
  683. # then $Conf{BackupFilesOnly} takes precedence and
  684. # $Conf{BackupFilesExclude} is ignored.
  685. #
  686. # This can be set to a string, an array of strings, or, in the case
  687. # of multiple shares, a hash of strings or arrays. A hash is used
  688. # to give a list of directories or files to exclude for each share
  689. # (the share name is the key). If this is set to just a string or
  690. # array, and $Conf{SmbShareName} contains multiple share names, then
  691. # the setting is assumed to apply to all shares.
  692. #
  693. # The exact behavior is determined by the underlying transport program,
  694. # smbclient or tar. For smbclient the exlclude file list is passed into
  695. # the X option. Simple shell wild-cards using "*" or "?" are allowed.
  696. #
  697. # For tar, if the exclude file contains a "/" it is assumed to be anchored
  698. # at the start of the string. Since all the tar paths start with "./",
  699. # BackupPC prepends a "." if the exclude file starts with a "/". Note
  700. # that GNU tar version >= 1.13.7 is required for the exclude option to
  701. # work correctly. For linux or unix machines you should add
  702. # "/proc" to $Conf{BackupFilesExclude} unless you have specified
  703. # --one-file-system in $Conf{TarClientCmd} or --one-file-system in
  704. # $Conf{RsyncArgs}. Also, for tar, do not use a trailing "/" in
  705. # the directory name: a trailing "/" causes the name to not match
  706. # and the directory will not be excluded.
  707. #
  708. # Users report that for smbclient you should specify a directory
  709. # followed by "/*", eg: "/proc/*", instead of just "/proc".
  710. #
  711. # FTP servers are traversed recursively so excluding directories will
  712. # also exclude its contents. You can use the wildcard characters "*"
  713. # and "?" to define files for inclusion and exclusion. Both
  714. # attributes $Conf{BackupFilesOnly} and $Conf{BackupFilesExclude} can
  715. # be defined for the same share.
  716. #
  717. # If a hash is used, a special key "*" means it applies to all
  718. # shares that don't have a specific entry.
  719. #
  720. # Examples:
  721. # $Conf{BackupFilesExclude} = '/temp';
  722. # $Conf{BackupFilesExclude} = ['/temp']; # same as first example
  723. # $Conf{BackupFilesExclude} = ['/temp', '/winnt/tmp'];
  724. # $Conf{BackupFilesExclude} = {
  725. # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
  726. # 'd' => ['/junk', '/dont_back_this_up'], # these are for 'd' share
  727. # };
  728. # $Conf{BackupFilesExclude} = {
  729. # 'c' => ['/temp', '/winnt/tmp'], # these are for 'c' share
  730. # '*' => ['/junk', '/dont_back_this_up'], # these are for other shares
  731. # };
  732. #
  733. $Conf{BackupFilesExclude} = {};
  734. #
  735. # PCs that are always or often on the network can be backed up after
  736. # hours, to reduce PC, network and server load during working hours. For
  737. # each PC a count of consecutive good pings is maintained. Once a PC has
  738. # at least $Conf{BlackoutGoodCnt} consecutive good pings it is subject
  739. # to "blackout" and not backed up during hours and days specified by
  740. # $Conf{BlackoutPeriods}.
  741. #
  742. # To allow for periodic rebooting of a PC or other brief periods when a
  743. # PC is not on the network, a number of consecutive bad pings is allowed
  744. # before the good ping count is reset. This parameter is
  745. # $Conf{BlackoutBadPingLimit}.
  746. #
  747. # Note that bad and good pings don't occur with the same interval. If a
  748. # machine is always on the network, it will only be pinged roughly once
  749. # every $Conf{IncrPeriod} (eg: once per day). So a setting for
  750. # $Conf{BlackoutGoodCnt} of 7 means it will take around 7 days for a
  751. # machine to be subject to blackout. On the other hand, if a ping is
  752. # failed, it will be retried roughly every time BackupPC wakes up, eg,
  753. # every one or two hours. So a setting for $Conf{BlackoutBadPingLimit} of
  754. # 3 means that the PC will lose its blackout status after 3-6 hours of
  755. # unavailability.
  756. #
  757. # To disable the blackout feature set $Conf{BlackoutGoodCnt} to a negative
  758. # value. A value of 0 will make all machines subject to blackout. But
  759. # if you don't want to do any backups during the day it would be easier
  760. # to just set $Conf{WakeupSchedule} to a restricted schedule.
  761. #
  762. $Conf{BlackoutBadPingLimit} = 3;
  763. $Conf{BlackoutGoodCnt} = 7;
  764. #
  765. # One or more blackout periods can be specified. If a client is
  766. # subject to blackout then no regular (non-manual) backups will
  767. # be started during any of these periods. hourBegin and hourEnd
  768. # specify hours fro midnight and weekDays is a list of days of
  769. # the week where 0 is Sunday, 1 is Monday etc.
  770. #
  771. # For example:
  772. #
  773. # $Conf{BlackoutPeriods} = [
  774. # {
  775. # hourBegin => 7.0,
  776. # hourEnd => 19.5,
  777. # weekDays => [1, 2, 3, 4, 5],
  778. # },
  779. # ];
  780. #
  781. # specifies one blackout period from 7:00am to 7:30pm local time
  782. # on Mon-Fri.
  783. #
  784. # The blackout period can also span midnight by setting
  785. # hourBegin > hourEnd, eg:
  786. #
  787. # $Conf{BlackoutPeriods} = [
  788. # {
  789. # hourBegin => 7.0,
  790. # hourEnd => 19.5,
  791. # weekDays => [1, 2, 3, 4, 5],
  792. # },
  793. # {
  794. # hourBegin => 23,
  795. # hourEnd => 5,
  796. # weekDays => [5, 6],
  797. # },
  798. # ];
  799. #
  800. # This specifies one blackout period from 7:00am to 7:30pm local time
  801. # on Mon-Fri, and a second period from 11pm to 5am on Friday and
  802. # Saturday night.
  803. #
  804. $Conf{BlackoutPeriods} = [
  805. {
  806. 'hourEnd' => '19.5',
  807. 'weekDays' => [
  808. 1,
  809. 2,
  810. 3,
  811. 4,
  812. 5
  813. ],
  814. 'hourBegin' => 7
  815. }
  816. ];
  817. #
  818. # A backup of a share that has zero files is considered fatal. This is
  819. # used to catch miscellaneous Xfer errors that result in no files being
  820. # backed up. If you have shares that might be empty (and therefore an
  821. # empty backup is valid) you should set this flag to 0.
  822. #
  823. $Conf{BackupZeroFilesIsFatal} = '1';
  824. ###########################################################################
  825. # How to backup a client
  826. # (can be overridden in the per-PC config.pl)
  827. ###########################################################################
  828. #
  829. # What transport method to use to backup each host. If you have
  830. # a mixed set of WinXX and linux/unix hosts you will need to override
  831. # this in the per-PC config.pl.
  832. #
  833. # The valid values are:
  834. #
  835. # - 'smb': backup and restore via smbclient and the SMB protocol.
  836. # Easiest choice for WinXX.
  837. #
  838. # - 'rsync': backup and restore via rsync (via rsh or ssh).
  839. # Best choice for linux/unix. Good choice also for WinXX.
  840. #
  841. # - 'rsyncd': backup and restore via rsync daemon on the client.
  842. # Best choice for linux/unix if you have rsyncd running on
  843. # the client. Good choice also for WinXX.
  844. #
  845. # - 'tar': backup and restore via tar, tar over ssh, rsh or nfs.
  846. # Good choice for linux/unix.
  847. #
  848. # - 'archive': host is a special archive host. Backups are not done.
  849. # An archive host is used to archive other host's backups
  850. # to permanent media, such as tape, CDR or DVD.
  851. #
  852. #
  853. $Conf{XferMethod} = 'smb';
  854. #
  855. # Level of verbosity in Xfer log files. 0 means be quiet, 1 will give
  856. # will give one line per file, 2 will also show skipped files on
  857. # incrementals, higher values give more output.
  858. #
  859. $Conf{XferLogLevel} = 1;
  860. #
  861. # Filename charset encoding on the client. BackupPC uses utf8
  862. # on the server for filename encoding. If this is empty, then
  863. # utf8 is assumed and client filenames will not be modified.
  864. # If set to a different encoding then filenames will converted
  865. # to/from utf8 automatically during backup and restore.
  866. #
  867. # If the file names displayed in the browser (eg: accents or special
  868. # characters) don't look right then it is likely you haven't set
  869. # $Conf{ClientCharset} correctly.
  870. #
  871. # If you are using smbclient on a WinXX machine, smbclient will convert
  872. # to the "unix charset" setting in smb.conf. The default is utf8,
  873. # in which case leave $Conf{ClientCharset} empty since smbclient does
  874. # the right conversion.
  875. #
  876. # If you are using rsync on a WinXX machine then it does no conversion.
  877. # A typical WinXX encoding for latin1/western europe is 'cp1252',
  878. # so in this case set $Conf{ClientCharset} to 'cp1252'.
  879. #
  880. # On a linux or unix client, run "locale charmap" to see the client's
  881. # charset. Set $Conf{ClientCharset} to this value. A typical value
  882. # for english/US is 'ISO-8859-1'.
  883. #
  884. # Do "perldoc Encode::Supported" to see the list of possible charset
  885. # values. The FAQ at http://www.cl.cam.ac.uk/~mgk25/unicode.html
  886. # is excellent, and http://czyborra.com/charsets/iso8859.html
  887. # provides more information on the iso-8859 charsets.
  888. #
  889. $Conf{ClientCharset} = '';
  890. #
  891. # Prior to 3.x no charset conversion was done by BackupPC. Backups were
  892. # stored in what ever charset the XferMethod provided - typically utf8
  893. # for smbclient and the client's locale settings for rsync and tar (eg:
  894. # cp1252 for rsync on WinXX and perhaps iso-8859-1 with rsync on linux).
  895. # This setting tells BackupPC the charset that was used to store file
  896. # names in old backups taken with BackupPC 2.x, so that non-ascii file
  897. # names in old backups can be viewed and restored.
  898. #
  899. $Conf{ClientCharsetLegacy} = 'iso-8859-1';
  900. ###########################################################################
  901. # Samba Configuration
  902. # (can be overwritten in the per-PC log file)
  903. ###########################################################################
  904. #
  905. # Name of the host share that is backed up when using SMB. This can be a
  906. # string or an array of strings if there are multiple shares per host.
  907. # Examples:
  908. #
  909. # $Conf{SmbShareName} = 'c'; # backup 'c' share
  910. # $Conf{SmbShareName} = ['c', 'd']; # backup 'c' and 'd' shares
  911. #
  912. # This setting only matters if $Conf{XferMethod} = 'smb'.
  913. #
  914. $Conf{SmbShareName} = [
  915. 'C$'
  916. ];
  917. #
  918. # Smbclient share user name. This is passed to smbclient's -U argument.
  919. #
  920. # This setting only matters if $Conf{XferMethod} = 'smb'.
  921. #
  922. $Conf{SmbShareUserName} = '';
  923. #
  924. # Smbclient share password. This is passed to smbclient via its PASSWD
  925. # environment variable. There are several ways you can tell BackupPC
  926. # the smb share password. In each case you should be very careful about
  927. # security. If you put the password here, make sure that this file is
  928. # not readable by regular users! See the "Setting up config.pl" section
  929. # in the documentation for more information.
  930. #
  931. # This setting only matters if $Conf{XferMethod} = 'smb'.
  932. #
  933. $Conf{SmbSharePasswd} = '';
  934. #
  935. # Full path for smbclient. Security caution: normal users should not
  936. # allowed to write to this file or directory.
  937. #
  938. # smbclient is from the Samba distribution. smbclient is used to
  939. # actually extract the incremental or full dump of the share filesystem
  940. # from the PC.
  941. #
  942. # This setting only matters if $Conf{XferMethod} = 'smb'.
  943. #
  944. $Conf{SmbClientPath} = '/usr/bin/smbclient';
  945. #
  946. # Command to run smbclient for a full dump.
  947. # This setting only matters if $Conf{XferMethod} = 'smb'.
  948. #
  949. # The following variables are substituted at run-time:
  950. #
  951. # $smbClientPath same as $Conf{SmbClientPath}
  952. # $host host to backup/restore
  953. # $hostIP host IP address
  954. # $shareName share name
  955. # $userName user name
  956. # $fileList list of files to backup (based on exclude/include)
  957. # $I_option optional -I option to smbclient
  958. # $X_option exclude option (if $fileList is an exclude list)
  959. # $timeStampFile start time for incremental dump
  960. #
  961. # Note: all Cmds are executed directly without a shell, so the prog name
  962. # needs to be a full path and you can't include shell syntax like
  963. # redirection and pipes; put that in a script if you need it.
  964. #
  965. $Conf{SmbClientFullCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -d 1 -c tarmode\\ full -Tc$X_option - $fileList';
  966. #
  967. # Command to run smbclient for an incremental dump.
  968. # This setting only matters if $Conf{XferMethod} = 'smb'.
  969. #
  970. # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
  971. #
  972. # Note: all Cmds are executed directly without a shell, so the prog name
  973. # needs to be a full path and you can't include shell syntax like
  974. # redirection and pipes; put that in a script if you need it.
  975. #
  976. $Conf{SmbClientIncrCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -d 1 -c tarmode\\ full -TcN$X_option $timeStampFile - $fileList';
  977. #
  978. # Command to run smbclient for a restore.
  979. # This setting only matters if $Conf{XferMethod} = 'smb'.
  980. #
  981. # Same variable substitutions are applied as $Conf{SmbClientFullCmd}.
  982. #
  983. # If your smb share is read-only then direct restores will fail.
  984. # You should set $Conf{SmbClientRestoreCmd} to undef and the
  985. # corresponding CGI restore option will be removed.
  986. #
  987. # Note: all Cmds are executed directly without a shell, so the prog name
  988. # needs to be a full path and you can't include shell syntax like
  989. # redirection and pipes; put that in a script if you need it.
  990. #
  991. $Conf{SmbClientRestoreCmd} = '$smbClientPath \\\\$host\\$shareName $I_option -U $userName -E -d 1 -c tarmode\\ full -Tx -';
  992. ###########################################################################
  993. # Tar Configuration
  994. # (can be overwritten in the per-PC log file)
  995. ###########################################################################
  996. #
  997. # Which host directories to backup when using tar transport. This can be a
  998. # string or an array of strings if there are multiple directories to
  999. # backup per host. Examples:
  1000. #
  1001. # $Conf{TarShareName} = '/'; # backup everything
  1002. # $Conf{TarShareName} = '/home'; # only backup /home
  1003. # $Conf{TarShareName} = ['/home', '/src']; # backup /home and /src
  1004. #
  1005. # The fact this parameter is called 'TarShareName' is for historical
  1006. # consistency with the Smb transport options. You can use any valid
  1007. # directory on the client: there is no need for it to correspond to
  1008. # any Smb share or device mount point.
  1009. #
  1010. # Note also that you can also use $Conf{BackupFilesOnly} to specify
  1011. # a specific list of directories to backup. It's more efficient to
  1012. # use this option instead of $Conf{TarShareName} since a new tar is
  1013. # run for each entry in $Conf{TarShareName}.
  1014. #
  1015. # On the other hand, if you add --one-file-system to $Conf{TarClientCmd}
  1016. # you can backup each file system separately, which makes restoring one
  1017. # bad file system easier. In this case you would list all of the mount
  1018. # points here, since you can't get the same result with
  1019. # $Conf{BackupFilesOnly}:
  1020. #
  1021. # $Conf{TarShareName} = ['/', '/var', '/data', '/boot'];
  1022. #
  1023. # This setting only matters if $Conf{XferMethod} = 'tar'.
  1024. #
  1025. $Conf{TarShareName} = [
  1026. '/'
  1027. ];
  1028. #
  1029. # Full command to run tar on the client. GNU tar is required. You will
  1030. # need to fill in the correct paths for ssh2 on the local host (server)
  1031. # and GNU tar on the client. Security caution: normal users should not
  1032. # allowed to write to these executable files or directories.
  1033. #
  1034. # See the documentation for more information about setting up ssh2 keys.
  1035. #
  1036. # If you plan to use NFS then tar just runs locally and ssh2 is not needed.
  1037. # For example, assuming the client filesystem is mounted below /mnt/hostName,
  1038. # you could use something like:
  1039. #
  1040. # $Conf{TarClientCmd} = '$tarPath -c -v -f - -C /mnt/$host/$shareName'
  1041. # . ' --totals';
  1042. #
  1043. # In the case of NFS or rsh you need to make sure BackupPC's privileges
  1044. # are sufficient to read all the files you want to backup. Also, you
  1045. # will probably want to add "/proc" to $Conf{BackupFilesExclude}.
  1046. #
  1047. # The following variables are substituted at run-time:
  1048. #
  1049. # $host host name
  1050. # $hostIP host's IP address
  1051. # $incrDate newer-than date for incremental backups
  1052. # $shareName share name to backup (ie: top-level directory path)
  1053. # $fileList specific files to backup or exclude
  1054. # $tarPath same as $Conf{TarClientPath}
  1055. # $sshPath same as $Conf{SshPath}
  1056. #
  1057. # If a variable is followed by a "+" it is shell escaped. This is
  1058. # necessary for the command part of ssh or rsh, since it ends up
  1059. # getting passed through the shell.
  1060. #
  1061. # This setting only matters if $Conf{XferMethod} = 'tar'.
  1062. #
  1063. # Note: all Cmds are executed directly without a shell, so the prog name
  1064. # needs to be a full path and you can't include shell syntax like
  1065. # redirection and pipes; put that in a script if you need it.
  1066. #
  1067. $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host env LC_ALL=C $tarPath -c -v -f - -C $shareName+ --totals';
  1068. #
  1069. # Extra tar arguments for full backups. Several variables are substituted at
  1070. # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
  1071. #
  1072. # If you are running tar locally (ie: without rsh or ssh) then remove the
  1073. # "+" so that the argument is no longer shell escaped.
  1074. #
  1075. # This setting only matters if $Conf{XferMethod} = 'tar'.
  1076. #
  1077. $Conf{TarFullArgs} = '$fileList+';
  1078. #
  1079. # Extra tar arguments for incr backups. Several variables are substituted at
  1080. # run-time. See $Conf{TarClientCmd} for the list of variable substitutions.
  1081. #
  1082. # Note that GNU tar has several methods for specifying incremental backups,
  1083. # including:
  1084. #
  1085. # --newer-mtime $incrDate+
  1086. # This causes a file to be included if the modification time is
  1087. # later than $incrDate (meaning its contents might have changed).
  1088. # But changes in the ownership or modes will not qualify the
  1089. # file to be included in an incremental.
  1090. #
  1091. # --newer=$incrDate+
  1092. # This causes the file to be included if any attribute of the
  1093. # file is later than $incrDate, meaning either attributes or
  1094. # the modification time. This is the default method. Do
  1095. # not use --atime-preserve in $Conf{TarClientCmd} above,
  1096. # otherwise resetting the atime (access time) counts as an
  1097. # attribute change, meaning the file will always be included
  1098. # in each new incremental dump.
  1099. #
  1100. # If you are running tar locally (ie: without rsh or ssh) then remove the
  1101. # "+" so that the argument is no longer shell escaped.
  1102. #
  1103. # This setting only matters if $Conf{XferMethod} = 'tar'.
  1104. #
  1105. $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+';
  1106. #
  1107. # Full command to run tar for restore on the client. GNU tar is required.
  1108. # This can be the same as $Conf{TarClientCmd}, with tar's -c replaced by -x
  1109. # and ssh's -n removed.
  1110. #
  1111. # See $Conf{TarClientCmd} for full details.
  1112. #
  1113. # This setting only matters if $Conf{XferMethod} = "tar".
  1114. #
  1115. # If you want to disable direct restores using tar, you should set
  1116. # $Conf{TarClientRestoreCmd} to undef and the corresponding CGI
  1117. # restore option will be removed.
  1118. #
  1119. # Note: all Cmds are executed directly without a shell, so the prog name
  1120. # needs to be a full path and you can't include shell syntax like
  1121. # redirection and pipes; put that in a script if you need it.
  1122. #
  1123. $Conf{TarClientRestoreCmd} = '$sshPath -q -x -l root $host env LC_ALL=C $tarPath -x -p --numeric-owner --same-owner -v -f - -C $shareName+';
  1124. #
  1125. # Full path for tar on the client. Security caution: normal users should not
  1126. # allowed to write to this file or directory.
  1127. #
  1128. # This setting only matters if $Conf{XferMethod} = 'tar'.
  1129. #
  1130. $Conf{TarClientPath} = '/bin/tar';
  1131. ###########################################################################
  1132. # Rsync/Rsyncd Configuration
  1133. # (can be overwritten in the per-PC log file)
  1134. ###########################################################################
  1135. #
  1136. # Path to rsync executable on the client
  1137. #
  1138. $Conf{RsyncClientPath} = '/usr/bin/rsync';
  1139. #
  1140. # Full command to run rsync on the client machine. The following variables
  1141. # are substituted at run-time:
  1142. #
  1143. # $host host name being backed up
  1144. # $hostIP host's IP address
  1145. # $shareName share name to backup (ie: top-level directory path)
  1146. # $rsyncPath same as $Conf{RsyncClientPath}
  1147. # $sshPath same as $Conf{SshPath}
  1148. # $argList argument list, built from $Conf{RsyncArgs},
  1149. # $shareName, $Conf{BackupFilesExclude} and
  1150. # $Conf{BackupFilesOnly}
  1151. #
  1152. # This setting only matters if $Conf{XferMethod} = 'rsync'.
  1153. #
  1154. $Conf{RsyncClientCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
  1155. #
  1156. # Full command to run rsync for restore on the client. The following
  1157. # variables are substituted at run-time:
  1158. #
  1159. # $host host name being backed up
  1160. # $hostIP host's IP address
  1161. # $shareName share name to backup (ie: top-level directory path)
  1162. # $rsyncPath same as $Conf{RsyncClientPath}
  1163. # $sshPath same as $Conf{SshPath}
  1164. # $argList argument list, built from $Conf{RsyncArgs},
  1165. # $shareName, $Conf{BackupFilesExclude} and
  1166. # $Conf{BackupFilesOnly}
  1167. #
  1168. # This setting only matters if $Conf{XferMethod} = 'rsync'.
  1169. #
  1170. # Note: all Cmds are executed directly without a shell, so the prog name
  1171. # needs to be a full path and you can't include shell syntax like
  1172. # redirection and pipes; put that in a script if you need it.
  1173. #
  1174. $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root $host $rsyncPath $argList+';
  1175. #
  1176. # Share name to backup. For $Conf{XferMethod} = "rsync" this should
  1177. # be a file system path, eg '/' or '/home'.
  1178. #
  1179. # For $Conf{XferMethod} = "rsyncd" this should be the name of the module
  1180. # to backup (ie: the name from /etc/rsynd.conf).
  1181. #
  1182. # This can also be a list of multiple file system paths or modules.
  1183. # For example, by adding --one-file-system to $Conf{RsyncArgs} you
  1184. # can backup each file system separately, which makes restoring one
  1185. # bad file system easier. In this case you would list all of the mount
  1186. # points:
  1187. #
  1188. # $Conf{RsyncShareName} = ['/', '/var', '/data', '/boot'];
  1189. #
  1190. $Conf{RsyncShareName} = [
  1191. '/'
  1192. ];
  1193. #
  1194. # Rsync daemon port on the client, for $Conf{XferMethod} = "rsyncd".
  1195. #
  1196. $Conf{RsyncdClientPort} = 873;
  1197. #
  1198. # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
  1199. # The user name and password are stored on the client in whatever file
  1200. # the "secrets file" parameter in rsyncd.conf points to
  1201. # (eg: /etc/rsyncd.secrets).
  1202. #
  1203. $Conf{RsyncdUserName} = '';
  1204. #
  1205. # Rsync daemon user name on client, for $Conf{XferMethod} = "rsyncd".
  1206. # The user name and password are stored on the client in whatever file
  1207. # the "secrets file" parameter in rsyncd.conf points to
  1208. # (eg: /etc/rsyncd.secrets).
  1209. #
  1210. $Conf{RsyncdPasswd} = '';
  1211. #
  1212. # Whether authentication is mandatory when connecting to the client's
  1213. # rsyncd. By default this is on, ensuring that BackupPC will refuse to
  1214. # connect to an rsyncd on the client that is not password protected.
  1215. # Turn off at your own risk.
  1216. #
  1217. $Conf{RsyncdAuthRequired} = '1';
  1218. #
  1219. # When rsync checksum caching is enabled (by adding the
  1220. # --checksum-seed=32761 option to $Conf{RsyncArgs}), the cached
  1221. # checksums can be occasionally verified to make sure the file
  1222. # contents matches the cached checksums. This is to avoid the
  1223. # risk that disk problems might cause the pool file contents to
  1224. # get corrupted, but the cached checksums would make BackupPC
  1225. # think that the file still matches the client.
  1226. #
  1227. # This setting is the probability (0 means never and 1 means always)
  1228. # that a file will be rechecked. Setting it to 0 means the checksums
  1229. # will not be rechecked (unless there is a phase 0 failure). Setting
  1230. # it to 1 (ie: 100%) means all files will be checked, but that is
  1231. # not a desirable setting since you are better off simply turning
  1232. # caching off (ie: remove the --checksum-seed option).
  1233. #
  1234. # The default of 0.01 means 1% (on average) of the files during a full
  1235. # backup will have their cached checksum re-checked.
  1236. #
  1237. # This setting has no effect unless checksum caching is turned on.
  1238. #
  1239. $Conf{RsyncCsumCacheVerifyProb} = '0.01';
  1240. #
  1241. # Arguments to rsync for backup. Do not edit the first set unless you
  1242. # have a thorough understanding of how File::RsyncP works.
  1243. #
  1244. $Conf{RsyncArgs} = [
  1245. '--numeric-ids',
  1246. '--perms',
  1247. '--owner',
  1248. '--group',
  1249. '-D',
  1250. '--links',
  1251. '--hard-links',
  1252. '--times',
  1253. '--block-size=2048',
  1254. '--recursive'
  1255. ];
  1256. #
  1257. # Additional arguments added to RsyncArgs. This can be used in
  1258. # conbination with $Conf{RsyncArgs} to allow customization of
  1259. # the rsync arguments on a part-client basis. The standard
  1260. # arguments go in $Conf{RsyncArgs} and $Conf{RsyncArgsExtra}
  1261. # can be set on a per-client basis.
  1262. #
  1263. # Examples of additional arguments that should work are --exclude/--include,
  1264. # eg:
  1265. #
  1266. # $Conf{RsyncArgsExtra} = [
  1267. # '--exclude', '/proc',
  1268. # '--exclude', '*.tmp',
  1269. # ];
  1270. #
  1271. # Both $Conf{RsyncArgs} and $Conf{RsyncArgsExtra} are subject
  1272. # to the following variable substitutions:
  1273. #
  1274. # $client client name being backed up
  1275. # $host host name (could be different from client name if
  1276. # $Conf{ClientNameAlias} is set)
  1277. # $hostIP IP address of host
  1278. # $confDir configuration directory path
  1279. #
  1280. # This allows settings of the form:
  1281. #
  1282. # $Conf{RsyncArgsExtra} = [
  1283. # '--exclude-from=$confDir/pc/$host.exclude',
  1284. # ];
  1285. #
  1286. $Conf{RsyncArgsExtra} = [];
  1287. #
  1288. # Arguments to rsync for restore. Do not edit the first set unless you
  1289. # have a thorough understanding of how File::RsyncP works.
  1290. #
  1291. # If you want to disable direct restores using rsync (eg: is the module
  1292. # is read-only), you should set $Conf{RsyncRestoreArgs} to undef and
  1293. # the corresponding CGI restore option will be removed.
  1294. #
  1295. # $Conf{RsyncRestoreArgs} is subject to the following variable
  1296. # substitutions:
  1297. #
  1298. # $client client name being backed up
  1299. # $host host name (could be different from client name if
  1300. # $Conf{ClientNameAlias} is set)
  1301. # $hostIP IP address of host
  1302. # $confDir configuration directory path
  1303. #
  1304. # Note: $Conf{RsyncArgsExtra} doesn't apply to $Conf{RsyncRestoreArgs}.
  1305. #
  1306. $Conf{RsyncRestoreArgs} = [
  1307. '--numeric-ids',
  1308. '--perms',
  1309. '--owner',
  1310. '--group',
  1311. '-D',
  1312. '--links',
  1313. '--hard-links',
  1314. '--times',
  1315. '--block-size=2048',
  1316. '--relative',
  1317. '--ignore-times',
  1318. '--recursive'
  1319. ];
  1320. ###########################################################################
  1321. # FTP Configuration
  1322. # (can be overwritten in the per-PC log file)
  1323. ##########################################################################
  1324. #
  1325. # Which host directories to backup when using FTP. This can be a
  1326. # string or an array of strings if there are multiple shares per host.
  1327. #
  1328. # This value must be specified in one of two ways: either as a
  1329. # subdirectory of the 'share root' on the server, or as the absolute
  1330. # path of the directory.
  1331. #
  1332. # In the following example, if the directory /home/username is the
  1333. # root share of the ftp server with the given username, the following
  1334. # two values will back up the same directory:
  1335. #
  1336. # $Conf{FtpShareName} = 'www'; # www directory
  1337. # $Conf{FtpShareName} = '/home/username/www'; # same directory
  1338. #
  1339. # Path resolution is not supported; i.e.; you may not have an ftp
  1340. # share path defined as '../otheruser' or '~/games'.
  1341. #
  1342. # Multiple shares may also be specified, as with other protocols:
  1343. #
  1344. # $Conf{FtpShareName} = [ 'www',
  1345. # 'bin',
  1346. # 'config' ];
  1347. #
  1348. # Note also that you can also use $Conf{BackupFilesOnly} to specify
  1349. # a specific list of directories to backup. It's more efficient to
  1350. # use this option instead of $Conf{FtpShareName} since a new tar is
  1351. # run for each entry in $Conf{FtpShareName}.
  1352. #
  1353. # This setting only matters if $Conf{XferMethod} = 'ftp'.
  1354. #
  1355. $Conf{FtpShareName} = [
  1356. ''
  1357. ];
  1358. #
  1359. # FTP user name. This is used to log into the server.
  1360. #
  1361. # This setting is used only if $Conf{XferMethod} = 'ftp'.
  1362. #
  1363. $Conf{FtpUserName} = '';
  1364. #
  1365. # FTP user password. This is used to log into the server.
  1366. #
  1367. # This setting is used only if $Conf{XferMethod} = 'ftp'.
  1368. #
  1369. $Conf{FtpPasswd} = '';
  1370. #
  1371. # Whether passive mode is used. The correct setting depends upon
  1372. # whether local or remote ports are accessible from the other machine,
  1373. # which is affected by any firewall or routers between the FTP server
  1374. # on the client and the BackupPC server.
  1375. #
  1376. # This setting is used only if $Conf{XferMethod} = 'ftp'.
  1377. #
  1378. $Conf{FtpPassive} = '1';
  1379. #
  1380. # Transfer block size. This sets the size of the amounts of data in
  1381. # each frame. While undefined, this value takes the default value.
  1382. #
  1383. # This setting is used only if $Conf{XferMethod} = 'ftp'.
  1384. #
  1385. $Conf{FtpBlockSize} = 10240;
  1386. #
  1387. # The port of the ftp server. If undefined, 21 is used.
  1388. #
  1389. # This setting is used only if $Conf{XferMethod} = 'ftp'.
  1390. #
  1391. $Conf{FtpPort} = 21;
  1392. #
  1393. # Connection timeout for FTP. When undefined, the default is 120 seconds.
  1394. #
  1395. # This setting is used only if $Conf{XferMethod} = 'ftp'.
  1396. #
  1397. $Conf{FtpTimeout} = 120;
  1398. #
  1399. # Behaviour when BackupPC encounters symlinks on the FTP share.
  1400. #
  1401. # Symlinks cannot be restored via FTP, so the desired behaviour will
  1402. # be different depending on the setup of the share. The default for
  1403. # this behavor is 1. Directory shares with more complicated directory
  1404. # structures should consider other protocols.
  1405. #
  1406. $Conf{FtpFollowSymlinks} = '0';
  1407. ###########################################################################
  1408. # Archive Configuration
  1409. # (can be overwritten in the per-PC log file)
  1410. ###########################################################################
  1411. #
  1412. # Archive Destination
  1413. #
  1414. # The Destination of the archive
  1415. # e.g. /tmp for file archive or /dev/nst0 for device archive
  1416. #
  1417. $Conf{ArchiveDest} = '/tmp';
  1418. #
  1419. # Archive Compression type
  1420. #
  1421. # The valid values are:
  1422. #
  1423. # - 'none': No Compression
  1424. #
  1425. # - 'gzip': Medium Compression. Recommended.
  1426. #
  1427. # - 'bzip2': High Compression but takes longer.
  1428. #
  1429. $Conf{ArchiveComp} = 'gzip';
  1430. #
  1431. # Archive Parity Files
  1432. #
  1433. # The amount of Parity data to generate, as a percentage
  1434. # of the archive size.
  1435. # Uses the commandline par2 (par2cmdline) available from
  1436. # http://parchive.sourceforge.net
  1437. #
  1438. # Only useful for file dumps.
  1439. #
  1440. # Set to 0 to disable this feature.
  1441. #
  1442. $Conf{ArchivePar} = '0';
  1443. #
  1444. # Archive Size Split
  1445. #
  1446. # Only for file archives. Splits the output into
  1447. # the specified size * 1,000,000.
  1448. # e.g. to split into 650,000,000 bytes, specify 650 below.
  1449. #
  1450. # If the value is 0, or if $Conf{ArchiveDest} is an existing file or
  1451. # device (e.g. a streaming tape drive), this feature is disabled.
  1452. #
  1453. $Conf{ArchiveSplit} = 0;
  1454. #
  1455. # Archive Command
  1456. #
  1457. # This is the command that is called to actually run the archive process
  1458. # for each host. The following variables are substituted at run-time:
  1459. #
  1460. # $Installdir The installation directory of BackupPC
  1461. # $tarCreatePath The path to BackupPC_tarCreate
  1462. # $splitpath The path to the split program
  1463. # $parpath The path to the par2 program
  1464. # $host The host to archive
  1465. # $backupnumber The backup number of the host to archive
  1466. # $compression The path to the compression program
  1467. # $compext The extension assigned to the compression type
  1468. # $splitsize The number of bytes to split archives into
  1469. # $archiveloc The location to put the archive
  1470. # $parfile The amount of parity data to create (percentage)
  1471. #
  1472. # Note: all Cmds are executed directly without a shell, so the prog name
  1473. # needs to be a full path and you can't include shell syntax like
  1474. # redirection and pipes; put that in a script if you need it.
  1475. #
  1476. $Conf{ArchiveClientCmd} = '$Installdir/bin/BackupPC_archiveHost $tarCreatePath $splitpath $parpath $host $backupnumber $compression $compext $splitsize $archiveloc $parfile *';
  1477. #
  1478. # Full path for ssh. Security caution: normal users should not
  1479. # allowed to write to this file or directory.
  1480. #
  1481. $Conf{SshPath} = '/usr/bin/ssh';
  1482. #
  1483. # Full path for nmblookup. Security caution: normal users should not
  1484. # allowed to write to this file or directory.
  1485. #
  1486. # nmblookup is from the Samba distribution. nmblookup is used to get the
  1487. # netbios name, necessary for DHCP hosts.
  1488. #
  1489. $Conf{NmbLookupPath} = '/usr/bin/nmblookup';
  1490. #
  1491. # NmbLookup command. Given an IP address, does an nmblookup on that
  1492. # IP address. The following variables are substituted at run-time:
  1493. #
  1494. # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
  1495. # $host IP address
  1496. #
  1497. # This command is only used for DHCP hosts: given an IP address, this
  1498. # command should try to find its NetBios name.
  1499. #
  1500. # Note: all Cmds are executed directly without a shell, so the prog name
  1501. # needs to be a full path and you can't include shell syntax like
  1502. # redirection and pipes; put that in a script if you need it.
  1503. #
  1504. $Conf{NmbLookupCmd} = '$nmbLookupPath -A $host';
  1505. #
  1506. # NmbLookup command. Given a netbios name, finds that host by doing
  1507. # a NetBios lookup. Several variables are substituted at run-time:
  1508. #
  1509. # $nmbLookupPath path to nmblookup ($Conf{NmbLookupPath})
  1510. # $host NetBios name
  1511. #
  1512. # In some cases you might need to change the broadcast address, for
  1513. # example if nmblookup uses 192.168.255.255 by default and you find
  1514. # that doesn't work, try 192.168.1.255 (or your equivalent class C
  1515. # address) using the -B option:
  1516. #
  1517. # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -B 192.168.1.255 $host';
  1518. #
  1519. # If you use a WINS server and your machines don't respond to
  1520. # multicast NetBios requests you can use this (replace 1.2.3.4
  1521. # with the IP address of your WINS server):
  1522. #
  1523. # $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath -R -U 1.2.3.4 $host';
  1524. #
  1525. # This is preferred over multicast since it minimizes network traffic.
  1526. #
  1527. # Experiment manually for your site to see what form of nmblookup command
  1528. # works.
  1529. #
  1530. # Note: all Cmds are executed directly without a shell, so the prog name
  1531. # needs to be a full path and you can't include shell syntax like
  1532. # redirection and pipes; put that in a script if you need it.
  1533. #
  1534. $Conf{NmbLookupFindHostCmd} = '$nmbLookupPath $host';
  1535. #
  1536. # For fixed IP address hosts, BackupPC_dump can also verify the netbios
  1537. # name to ensure it matches the host name. An error is generated if
  1538. # they do not match. Typically this flag is off. But if you are going
  1539. # to transition a bunch of machines from fixed host addresses to DHCP,
  1540. # setting this flag is a great way to verify that the machines have
  1541. # their netbios name set correctly before turning on DCHP.
  1542. #
  1543. $Conf{FixedIPNetBiosNameCheck} = '0';
  1544. #
  1545. # Full path to the ping command. Security caution: normal users
  1546. # should not be allowed to write to this file or directory.
  1547. #
  1548. # If you want to disable ping checking, set this to some program
  1549. # that exits with 0 status, eg:
  1550. #
  1551. # $Conf{PingPath} = '/bin/echo';
  1552. #
  1553. $Conf{PingPath} = '/bin/ping';
  1554. $Conf{Ping6Path} = undef;
  1555. #
  1556. # Ping command. The following variables are substituted at run-time:
  1557. #
  1558. # $pingPath path to ping ($Conf{PingPath})
  1559. # $host host name
  1560. #
  1561. # Wade Brown reports that on solaris 2.6 and 2.7 ping -s returns the wrong
  1562. # exit status (0 even on failure). Replace with "ping $host 1", which
  1563. # gets the correct exit status but we don't get the round-trip time.
  1564. #
  1565. # Note: all Cmds are executed directly without a shell, so the prog name
  1566. # needs to be a full path and you can't include shell syntax like
  1567. # redirection and pipes; put that in a script if you need it.
  1568. #
  1569. $Conf{PingCmd} = '$pingPath -c 1 $host';
  1570. #
  1571. # Maximum round-trip ping time in milliseconds. This threshold is set
  1572. # to avoid backing up PCs that are remotely connected through WAN or
  1573. # dialup connections. The output from ping -s (assuming it is supported
  1574. # on your system) is used to check the round-trip packet time. On your
  1575. # local LAN round-trip times should be much less than 20msec. On most
  1576. # WAN or dialup connections the round-trip time will be typically more
  1577. # than 20msec. Tune if necessary.
  1578. #
  1579. $Conf{PingMaxMsec} = 100;
  1580. #
  1581. # Compression level to use on files. 0 means no compression. Compression
  1582. # levels can be from 1 (least cpu time, slightly worse compression) to
  1583. # 9 (most cpu time, slightly better compression). The recommended value
  1584. # is 3. Changing to 5, for example, will take maybe 20% more cpu time
  1585. # and will get another 2-3% additional compression. See the zlib
  1586. # documentation for more information about compression levels.
  1587. #
  1588. # Changing compression on or off after backups have already been done
  1589. # will require both compressed and uncompressed pool files to be stored.
  1590. # This will increase the pool storage requirements, at least until all
  1591. # the old backups expire and are deleted.
  1592. #
  1593. # It is ok to change the compression value (from one non-zero value to
  1594. # another non-zero value) after dumps are already done. Since BackupPC
  1595. # matches pool files by comparing the uncompressed versions, it will still
  1596. # correctly match new incoming files against existing pool files. The
  1597. # new compression level will take effect only for new files that are
  1598. # newly compressed and added to the pool.
  1599. #
  1600. # If compression was off and you are enabling compression for the first
  1601. # time you can use the BackupPC_compressPool utility to compress the
  1602. # pool. This avoids having the pool grow to accommodate both compressed
  1603. # and uncompressed backups. See the documentation for more information.
  1604. #
  1605. # Note: compression needs the Compress::Zlib perl library. If the
  1606. # Compress::Zlib library can't be found then $Conf{CompressLevel} is
  1607. # forced to 0 (compression off).
  1608. #
  1609. $Conf{CompressLevel} = 3;
  1610. #
  1611. # Timeout in seconds when listening for the transport program's
  1612. # (smbclient, tar etc) stdout. If no output is received during this
  1613. # time, then it is assumed that something has wedged during a backup,
  1614. # and the backup is terminated.
  1615. #
  1616. # Note that stdout buffering combined with huge files being backed up
  1617. # could cause longish delays in the output from smbclient that
  1618. # BackupPC_dump sees, so in rare cases you might want to increase
  1619. # this value.
  1620. #
  1621. # Despite the name, this parameter sets the timeout for all transport
  1622. # methods (tar, smb etc).
  1623. #
  1624. $Conf{ClientTimeout} = 72000;
  1625. #
  1626. # Maximum number of log files we keep around in each PC's directory
  1627. # (ie: pc/$host). These files are aged monthly. A setting of 12
  1628. # means there will be at most the files LOG, LOG.0, LOG.1, ... LOG.11
  1629. # in the pc/$host directory (ie: about a years worth). (Except this
  1630. # month's LOG, these files will have a .z extension if compression
  1631. # is on).
  1632. #
  1633. # If you decrease this number after BackupPC has been running for a
  1634. # while you will have to manually remove the older log files.
  1635. #
  1636. $Conf{MaxOldPerPCLogFiles} = 12;
  1637. #
  1638. # Optional commands to run before and after dumps and restores,
  1639. # and also before and after each share of a dump.
  1640. #
  1641. # Stdout from these commands will be written to the Xfer (or Restore)
  1642. # log file. One example of using these commands would be to
  1643. # shut down and restart a database server, dump a database
  1644. # to files for backup, or doing a snapshot of a share prior
  1645. # to a backup. Example:
  1646. #
  1647. # $Conf{DumpPreUserCmd} = '$sshPath -q -x -l root $host /usr/bin/dumpMysql';
  1648. #
  1649. # The following variable substitutions are made at run time for
  1650. # $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd}, $Conf{DumpPreShareCmd}
  1651. # and $Conf{DumpPostShareCmd}:
  1652. #
  1653. # $type type of dump (incr or full)
  1654. # $xferOK 1 if the dump succeeded, 0 if it didn't
  1655. # $client client name being backed up
  1656. # $host host name (could be different from client name if
  1657. # $Conf{ClientNameAlias} is set)
  1658. # $hostIP IP address of host
  1659. # $user user name from the hosts file
  1660. # $moreUsers list of additional users from the hosts file
  1661. # $share the first share name (or current share for
  1662. # $Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd})
  1663. # $shares list of all the share names
  1664. # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
  1665. # $sshPath value of $Conf{SshPath},
  1666. # $cmdType set to DumpPreUserCmd or DumpPostUserCmd
  1667. #
  1668. # The following variable substitutions are made at run time for
  1669. # $Conf{RestorePreUserCmd} and $Conf{RestorePostUserCmd}:
  1670. #
  1671. # $client client name being backed up
  1672. # $xferOK 1 if the restore succeeded, 0 if it didn't
  1673. # $host host name (could be different from client name if
  1674. # $Conf{ClientNameAlias} is set)
  1675. # $hostIP IP address of host
  1676. # $user user name from the hosts file
  1677. # $moreUsers list of additional users from the hosts file
  1678. # $share the first share name
  1679. # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
  1680. # $sshPath value of $Conf{SshPath},
  1681. # $type set to "restore"
  1682. # $bkupSrcHost host name of the restore source
  1683. # $bkupSrcShare share name of the restore source
  1684. # $bkupSrcNum backup number of the restore source
  1685. # $pathHdrSrc common starting path of restore source
  1686. # $pathHdrDest common starting path of destination
  1687. # $fileList list of files being restored
  1688. # $cmdType set to RestorePreUserCmd or RestorePostUserCmd
  1689. #
  1690. # The following variable substitutions are made at run time for
  1691. # $Conf{ArchivePreUserCmd} and $Conf{ArchivePostUserCmd}:
  1692. #
  1693. # $client client name being backed up
  1694. # $xferOK 1 if the archive succeeded, 0 if it didn't
  1695. # $host Name of the archive host
  1696. # $user user name from the hosts file
  1697. # $share the first share name
  1698. # $XferMethod value of $Conf{XferMethod} (eg: tar, rsync, smb)
  1699. # $HostList list of hosts being archived
  1700. # $BackupList list of backup numbers for the hosts being archived
  1701. # $archiveloc location where the archive is sent to
  1702. # $parfile amount of parity data being generated (percentage)
  1703. # $compression compression program being used (eg: cat, gzip, bzip2)
  1704. # $compext extension used for compression type (eg: raw, gz, bz2)
  1705. # $splitsize size of the files that the archive creates
  1706. # $sshPath value of $Conf{SshPath},
  1707. # $type set to "archive"
  1708. # $cmdType set to ArchivePreUserCmd or ArchivePostUserCmd
  1709. #
  1710. # Note: all Cmds are executed directly without a shell, so the prog name
  1711. # needs to be a full path and you can't include shell syntax like
  1712. # redirection and pipes; put that in a script if you need it.
  1713. #
  1714. $Conf{DumpPreUserCmd} = undef;
  1715. $Conf{DumpPostUserCmd} = undef;
  1716. $Conf{DumpPreShareCmd} = undef;
  1717. $Conf{DumpPostShareCmd} = undef;
  1718. $Conf{RestorePreUserCmd} = undef;
  1719. $Conf{RestorePostUserCmd} = undef;
  1720. $Conf{ArchivePreUserCmd} = undef;
  1721. $Conf{ArchivePostUserCmd} = undef;
  1722. #
  1723. # Whether the exit status of each PreUserCmd and
  1724. # PostUserCmd is checked.
  1725. #
  1726. # If set and the Dump/Restore/Archive Pre/Post UserCmd
  1727. # returns a non-zero exit status then the dump/restore/archive
  1728. # is aborted. To maintain backward compatibility (where
  1729. # the exit status in early versions was always ignored),
  1730. # this flag defaults to 0.
  1731. #
  1732. # If this flag is set and the Dump/Restore/Archive PreUserCmd
  1733. # fails then the matching Dump/Restore/Archive PostUserCmd is
  1734. # not executed. If DumpPreShareCmd returns a non-exit status,
  1735. # then DumpPostShareCmd is not executed, but the DumpPostUserCmd
  1736. # is still run (since DumpPreUserCmd must have previously
  1737. # succeeded).
  1738. #
  1739. # An example of a DumpPreUserCmd that might fail is a script
  1740. # that snapshots or dumps a database which fails because
  1741. # of some database error.
  1742. #
  1743. $Conf{UserCmdCheckStatus} = '0';
  1744. #
  1745. # Override the client's host name. This allows multiple clients
  1746. # to all refer to the same physical host. This should only be
  1747. # set in the per-PC config file and is only used by BackupPC at
  1748. # the last moment prior to generating the command used to backup
  1749. # that machine (ie: the value of $Conf{ClientNameAlias} is invisible
  1750. # everywhere else in BackupPC). The setting can be a host name or
  1751. # IP address, eg:
  1752. #
  1753. # $Conf{ClientNameAlias} = 'realHostName';
  1754. # $Conf{ClientNameAlias} = '192.1.1.15';
  1755. #
  1756. # will cause the relevant smb/tar/rsync backup/restore commands to be
  1757. # directed to realHostName, not the client name.
  1758. #
  1759. # Note: this setting doesn't work for hosts with DHCP set to 1.
  1760. #
  1761. $Conf{ClientNameAlias} = undef;
  1762. ###########################################################################
  1763. # Email reminders, status and messages
  1764. # (can be overridden in the per-PC config.pl)
  1765. ###########################################################################
  1766. #
  1767. # Full path to the sendmail command. Security caution: normal users
  1768. # should not allowed to write to this file or directory.
  1769. #
  1770. $Conf{SendmailPath} = '/usr/sbin/sendmail';
  1771. #
  1772. # Minimum period between consecutive emails to a single user.
  1773. # This tries to keep annoying email to users to a reasonable
  1774. # level. Email checks are done nightly, so this number is effectively
  1775. # rounded up (ie: 2.5 means a user will never receive email more
  1776. # than once every 3 days).
  1777. #
  1778. $Conf{EMailNotifyMinDays} = '2.5';
  1779. #
  1780. # Name to use as the "from" name for email. Depending upon your mail
  1781. # handler this is either a plain name (eg: "admin") or a fully-qualified
  1782. # name (eg: "admin@mydomain.com").
  1783. #
  1784. $Conf{EMailFromUserName} = 'backuppc';
  1785. #
  1786. # Destination address to an administrative user who will receive a
  1787. # nightly email with warnings and errors. If there are no warnings
  1788. # or errors then no email will be sent. Depending upon your mail
  1789. # handler this is either a plain name (eg: "admin") or a fully-qualified
  1790. # name (eg: "admin@mydomain.com").
  1791. #
  1792. $Conf{EMailAdminUserName} = 'backuppc';
  1793. #
  1794. # Destination domain name for email sent to users. By default
  1795. # this is empty, meaning email is sent to plain, unqualified
  1796. # addresses. Otherwise, set it to the destintation domain, eg:
  1797. #
  1798. # $Cong{EMailUserDestDomain} = '@mydomain.com';
  1799. #
  1800. # With this setting user email will be set to 'user@mydomain.com'.
  1801. #
  1802. $Conf{EMailUserDestDomain} = '';
  1803. #
  1804. # This subject and message is sent to a user if their PC has never been
  1805. # backed up.
  1806. #
  1807. # These values are language-dependent. The default versions can be
  1808. # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
  1809. # need to change the message, copy it here and edit it, eg:
  1810. #
  1811. # $Conf{EMailNoBackupEverMesg} = <<'EOF';
  1812. # To: $user$domain
  1813. # cc:
  1814. # Subject: $subj
  1815. #
  1816. # Dear $userName,
  1817. #
  1818. # This is a site-specific email message.
  1819. # EOF
  1820. #
  1821. $Conf{EMailNoBackupEverSubj} = undef;
  1822. $Conf{EMailNoBackupEverMesg} = undef;
  1823. #
  1824. # How old the most recent backup has to be before notifying user.
  1825. # When there have been no backups in this number of days the user
  1826. # is sent an email.
  1827. #
  1828. $Conf{EMailNotifyOldBackupDays} = 7;
  1829. #
  1830. # This subject and message is sent to a user if their PC has not recently
  1831. # been backed up (ie: more than $Conf{EMailNotifyOldBackupDays} days ago).
  1832. #
  1833. # These values are language-dependent. The default versions can be
  1834. # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
  1835. # need to change the message, copy it here and edit it, eg:
  1836. #
  1837. # $Conf{EMailNoBackupRecentMesg} = <<'EOF';
  1838. # To: $user$domain
  1839. # cc:
  1840. # Subject: $subj
  1841. #
  1842. # Dear $userName,
  1843. #
  1844. # This is a site-specific email message.
  1845. # EOF
  1846. #
  1847. $Conf{EMailNoBackupRecentSubj} = undef;
  1848. $Conf{EMailNoBackupRecentMesg} = undef;
  1849. #
  1850. # How old the most recent backup of Outlook files has to be before
  1851. # notifying user.
  1852. #
  1853. $Conf{EMailNotifyOldOutlookDays} = 5;
  1854. #
  1855. # This subject and message is sent to a user if their Outlook files have
  1856. # not recently been backed up (ie: more than $Conf{EMailNotifyOldOutlookDays}
  1857. # days ago).
  1858. #
  1859. # These values are language-dependent. The default versions can be
  1860. # found in the language file (eg: lib/BackupPC/Lang/en.pm). If you
  1861. # need to change the message, copy it here and edit it, eg:
  1862. #
  1863. # $Conf{EMailOutlookBackupMesg} = <<'EOF';
  1864. # To: $user$domain
  1865. # cc:
  1866. # Subject: $subj
  1867. #
  1868. # Dear $userName,
  1869. #
  1870. # This is a site-specific email message.
  1871. # EOF
  1872. #
  1873. $Conf{EMailOutlookBackupSubj} = undef;
  1874. $Conf{EMailOutlookBackupMesg} = undef;
  1875. #
  1876. # Additional email headers. This sets to charset to
  1877. # utf8.
  1878. #
  1879. $Conf{EMailHeaders} = 'MIME-Version: 1.0
  1880. Content-Type: text/plain; charset="utf-8"
  1881. ';
  1882. ###########################################################################
  1883. # CGI user interface configuration settings
  1884. # (can be overridden in the per-PC config.pl)
  1885. ###########################################################################
  1886. #
  1887. # Normal users can only access information specific to their host.
  1888. # They can start/stop/browse/restore backups.
  1889. #
  1890. # Administrative users have full access to all hosts, plus overall
  1891. # status and log information.
  1892. #
  1893. # The administrative users are the union of the unix/linux group
  1894. # $Conf{CgiAdminUserGroup} and the manual list of users, separated
  1895. # by spaces, in $Conf{CgiAdminUsers}. If you don't want a group or
  1896. # manual list of users set the corresponding configuration setting
  1897. # to undef or an empty string.
  1898. #
  1899. # If you want every user to have admin privileges (careful!), set
  1900. # $Conf{CgiAdminUsers} = '*'.
  1901. #
  1902. # Examples:
  1903. # $Conf{CgiAdminUserGroup} = 'admin';
  1904. # $Conf{CgiAdminUsers} = 'craig celia';
  1905. # --> administrative users are the union of group admin, plus
  1906. # craig and celia.
  1907. #
  1908. # $Conf{CgiAdminUserGroup} = '';
  1909. # $Conf{CgiAdminUsers} = 'craig celia';
  1910. # --> administrative users are only craig and celia'.
  1911. #
  1912. $Conf{CgiAdminUserGroup} = 'backuppc';
  1913. $Conf{CgiAdminUsers} = 'backuppc madhu';
  1914. #
  1915. # URL of the BackupPC_Admin CGI script. Used for email messages.
  1916. #
  1917. $Conf{CgiURL} = 'http://storageblock/backuppc/index.cgi';
  1918. #
  1919. # Language to use. See lib/BackupPC/Lang for the list of supported
  1920. # languages, which include English (en), French (fr), Spanish (es),
  1921. # German (de), Italian (it), Dutch (nl), Polish (pl), Portuguese
  1922. # Brazillian (pt_br) and Chinese (zh_CH).
  1923. #
  1924. # Currently the Language setting applies to the CGI interface and email
  1925. # messages sent to users. Log files and other text are still in English.
  1926. #
  1927. $Conf{Language} = 'en';
  1928. #
  1929. # User names that are rendered by the CGI interface can be turned
  1930. # into links into their home page or other information about the
  1931. # user. To set this up you need to create two sprintf() strings,
  1932. # that each contain a single '%s' that will be replaced by the user
  1933. # name. The default is a mailto: link.
  1934. #
  1935. # $Conf{CgiUserHomePageCheck} should be an absolute file path that
  1936. # is used to check (via "-f") that the user has a valid home page.
  1937. # Set this to undef or an empty string to turn off this check.
  1938. #
  1939. # $Conf{CgiUserUrlCreate} should be a full URL that points to the
  1940. # user's home page. Set this to undef or an empty string to turn
  1941. # off generation of URLs for user names.
  1942. #
  1943. # Example:
  1944. # $Conf{CgiUserHomePageCheck} = '/var/www/html/users/%s.html';
  1945. # $Conf{CgiUserUrlCreate} = 'http://myhost/users/%s.html';
  1946. # --> if /var/www/html/users/craig.html exists, then 'craig' will
  1947. # be rendered as a link to http://myhost/users/craig.html.
  1948. #
  1949. $Conf{CgiUserHomePageCheck} = '';
  1950. $Conf{CgiUserUrlCreate} = 'mailto:%s';
  1951. #
  1952. # Date display format for CGI interface. A value of 1 uses US-style
  1953. # dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero
  1954. # for international dates (DD/MM).
  1955. #
  1956. $Conf{CgiDateFormatMMDD} = 1;
  1957. #
  1958. # If set, the complete list of hosts appears in the left navigation
  1959. # bar pull-down for administrators. Otherwise, just the hosts for which
  1960. # the user is listed in the host file (as either the user or in moreUsers)
  1961. # are displayed.
  1962. #
  1963. $Conf{CgiNavBarAdminAllHosts} = '1';
  1964. #
  1965. # Enable/disable the search box in the navigation bar.
  1966. #
  1967. $Conf{CgiSearchBoxEnable} = '1';
  1968. #
  1969. # Additional navigation bar links. These appear for both regular users
  1970. # and administrators. This is a list of hashes giving the link (URL)
  1971. # and the text (name) for the link. Specifying lname instead of name
  1972. # uses the language specific string (ie: $Lang->{lname}) instead of
  1973. # just literally displaying name.
  1974. #
  1975. $Conf{CgiNavBarLinks} = [
  1976. {
  1977. 'link' => '?action=view&type=docs',
  1978. 'lname' => 'Documentation',
  1979. 'name' => undef
  1980. },
  1981. {
  1982. 'name' => 'Wiki',
  1983. 'lname' => undef,
  1984. 'link' => 'http://backuppc.wiki.sourceforge.net'
  1985. },
  1986. {
  1987. 'link' => 'http://backuppc.sourceforge.net',
  1988. 'name' => 'SourceForge',
  1989. 'lname' => undef
  1990. }
  1991. ];
  1992. #
  1993. # Hilight colors based on status that are used in the PC summary page.
  1994. #
  1995. $Conf{CgiStatusHilightColor} = {
  1996. 'Reason_backup_failed' => '#ffcccc',
  1997. 'Reason_backup_done' => '#ccffcc',
  1998. 'Status_backup_in_progress' => '#66cc99',
  1999. 'Reason_no_ping' => '#ffff99',
  2000. 'Disabled_AllBackupsDisabled' => '#d1d1d1',
  2001. 'Disabled_OnlyManualBackups' => '#d1d1d1',
  2002. 'Reason_backup_canceled_by_user' => '#ff9900'
  2003. };
  2004. #
  2005. # Additional CGI header text.
  2006. #
  2007. $Conf{CgiHeaders} = '<meta http-equiv="pragma" content="no-cache">';
  2008. #
  2009. # Directory where images are stored. This directory should be below
  2010. # Apache's DocumentRoot. This value isn't used by BackupPC but is
  2011. # used by configure.pl when you upgrade BackupPC.
  2012. #
  2013. # Example:
  2014. # $Conf{CgiImageDir} = '/var/www/htdocs/BackupPC';
  2015. #
  2016. $Conf{CgiImageDir} = '/usr/share/backuppc/image';
  2017. #
  2018. # Additional mappings of file name extenions to Content-Type for
  2019. # individual file restore. See $Ext2ContentType in BackupPC_Admin
  2020. # for the default setting. You can add additional settings here,
  2021. # or override any default settings. Example:
  2022. #
  2023. # $Conf{CgiExt2ContentType} = {
  2024. # 'pl' => 'text/plain',
  2025. # };
  2026. #
  2027. $Conf{CgiExt2ContentType} = {};
  2028. #
  2029. # URL (without the leading http://host) for BackupPC's image directory.
  2030. # The CGI script uses this value to serve up image files.
  2031. #
  2032. # Example:
  2033. # $Conf{CgiImageDirURL} = '/BackupPC';
  2034. #
  2035. $Conf{CgiImageDirURL} = '/backuppc/image';
  2036. #
  2037. # CSS stylesheet "skin" for the CGI interface. It is stored
  2038. # in the $Conf{CgiImageDir} directory and accessed via the
  2039. # $Conf{CgiImageDirURL} URL.
  2040. #
  2041. # For BackupPC v3.x several color, layout and font changes were made.
  2042. # The previous v2.x version is available as BackupPC_stnd_orig.css, so
  2043. # if you prefer the old skin, change this to BackupPC_stnd_orig.css.
  2044. #
  2045. $Conf{CgiCSSFile} = 'BackupPC_stnd.css';
  2046. #
  2047. # Whether the user is allowed to edit their per-PC config.
  2048. #
  2049. $Conf{CgiUserConfigEditEnable} = '1';
  2050. #
  2051. # Which per-host config variables a non-admin user is allowed
  2052. # to edit. Admin users can edit all per-host config variables,
  2053. # even if disabled in this list.
  2054. #
  2055. # SECURITY WARNING: Do not let users edit any of the Cmd
  2056. # config variables! That's because a user could set a
  2057. # Cmd to a shell script of their choice and it will be
  2058. # run as the BackupPC user. That script could do all
  2059. # sorts of bad things.
  2060. #
  2061. $Conf{CgiUserConfigEdit} = {
  2062. 'SmbClientRestoreCmd' => '0',
  2063. 'FtpPasswd' => '1',
  2064. 'BlackoutBadPingLimit' => '1',
  2065. 'UserCmdCheckStatus' => '0',
  2066. 'MaxOldPerPCLogFiles' => '1',
  2067. 'ClientCharset' => '1',
  2068. 'XferMethod' => '1',
  2069. 'FullKeepCnt' => '1',
  2070. 'ArchiveClientCmd' => '0',
  2071. 'EMailNoBackupRecentSubj' => '1',
  2072. 'FixedIPNetBiosNameCheck' => '1',
  2073. 'FtpUserName' => '1',
  2074. 'ClientNameAlias' => '1',
  2075. 'FullPeriod' => '1',
  2076. 'TarIncrArgs' => '1',
  2077. 'SmbClientFullCmd' => '0',
  2078. 'RsyncdAuthRequired' => '1',
  2079. 'TarClientRestoreCmd' => '0',
  2080. 'XferLogLevel' => '1',
  2081. 'RestorePostUserCmd' => '0',
  2082. 'FtpTimeout' => '1',
  2083. 'BlackoutPeriods' => '1',
  2084. 'SmbClientIncrCmd' => '0',
  2085. 'SmbSharePasswd' => '1',
  2086. 'RsyncArgsExtra' => '1',
  2087. 'RestoreInfoKeepCnt' => '1',
  2088. 'CompressLevel' => '1',
  2089. 'RsyncClientRestoreCmd' => '0',
  2090. 'RsyncArgs' => '1',
  2091. 'TarFullArgs' => '1',
  2092. 'EMailNotifyOldOutlookDays' => '1',
  2093. 'RsyncdUserName' => '1',
  2094. 'SmbShareUserName' => '1',
  2095. 'NmbLookupFindHostCmd' => '0',
  2096. 'DumpPostUserCmd' => '0',
  2097. 'DumpPreUserCmd' => '0',
  2098. 'EMailOutlookBackupSubj' => '1',
  2099. 'EMailNotifyOldBackupDays' => '1',
  2100. 'FtpRestoreEnabled' => '1',
  2101. 'EMailOutlookBackupMesg' => '1',
  2102. 'ArchiveSplit' => '1',
  2103. 'FtpPort' => '1',
  2104. 'BackupsDisable' => '1',
  2105. 'PingCmd' => '0',
  2106. 'IncrFill' => '1',
  2107. 'NmbLookupCmd' => '0',
  2108. 'IncrPeriod' => '1',
  2109. 'RsyncClientCmd' => '0',
  2110. 'FullAgeMax' => '1',
  2111. 'IncrKeepCntMin' => '1',
  2112. 'BackupFilesOnly' => '1',
  2113. 'ArchiveInfoKeepCnt' => '1',
  2114. 'EMailHeaders' => '1',
  2115. 'EMailNotifyMinDays' => '1',
  2116. 'IncrKeepCnt' => '1',
  2117. 'TarClientCmd' => '0',
  2118. 'BackupFilesExclude' => '1',
  2119. 'FtpShareName' => '1',
  2120. 'EMailNoBackupRecentMesg' => '1',
  2121. 'PartialAgeMax' => '1',
  2122. 'ClientCharsetLegacy' => '1',
  2123. 'FtpFollowSymlinks' => '1',
  2124. 'EMailAdminUserName' => '1',
  2125. 'IncrLevels' => '1',
  2126. 'ArchiveDest' => '1',
  2127. 'ClientTimeout' => '1',
  2128. 'EMailNoBackupEverMesg' => '1',
  2129. 'PingMaxMsec' => '1',
  2130. 'DumpPostShareCmd' => '0',
  2131. 'RsyncRestoreArgs' => '1',
  2132. 'RsyncCsumCacheVerifyProb' => '1',
  2133. 'ArchivePar' => '1',
  2134. 'EMailNoBackupEverSubj' => '1',
  2135. 'FullKeepCntMin' => '1',
  2136. 'RsyncShareName' => '1',
  2137. 'EMailUserDestDomain' => '1',
  2138. 'SmbShareName' => '1',
  2139. 'DumpPreShareCmd' => '0',
  2140. 'IncrAgeMax' => '1',
  2141. 'RsyncClientPath' => '0',
  2142. 'RsyncdClientPort' => '1',
  2143. 'EMailFromUserName' => '1',
  2144. 'RsyncdPasswd' => '1',
  2145. 'TarClientPath' => '0',
  2146. 'TarShareName' => '1',
  2147. 'BlackoutGoodCnt' => '1',
  2148. 'ArchivePostUserCmd' => '0',
  2149. 'ArchivePreUserCmd' => '0',
  2150. 'BackupZeroFilesIsFatal' => '1',
  2151. 'FtpBlockSize' => '1',
  2152. 'ArchiveComp' => '1',
  2153. 'RestorePreUserCmd' => '0'
  2154. };