On Tue, Apr 06, 2010 at 02:36:38PM +0800, Craig Ringer wrote: > I'm sure many people using disk-based storage find that, like me, they > have three pools defined for almost every job or at least class of job, > like this:
You could use standard include ("@") feature of bacula configuration files, for example: in /etc/bacula/pool-default-values.conf: Storage = "SystemStorage" Pool Type = Backup Recycle = yes AutoPrune = yes Volume Use Duration = 1 day Recycle Oldest Volume = yes and in /etc/bacula/bacula-dir.conf: Pool { @/etc/bacula/pool-default-values.conf Name = "SystemFullPool" Volume Retention = 2 months LabelFormat = "SystemFull-" } Pool { @/etc/bacula/pool-default-values.conf Name = "SystemDiffPool" Volume Retention = 2 weeks LabelFormat = "SystemDiff-" } Pool { @/etc/bacula/pool-default-values.conf Name = "SystemIncrPool" Volume Retention = 1 week LabelFormat = "SystemIncr-" } Much more readable and easier to maintain than original config: > Pool { > Name = "SystemFullPool" > Storage = "SystemStorage" > Pool Type = Backup > Recycle = yes > AutoPrune = yes > Volume Retention = 2 months > Volume Use Duration = 1 day > Recycle Oldest Volume = yes > LabelFormat = "SystemFull-" > } > Pool { > Name = "SystemDiffPool" > Storage = "SystemStorage" > Pool Type = Backup > Recycle = yes > AutoPrune = yes > Volume Retention = 2 weeks > Volume Use Duration = 1 day > Recycle Oldest Volume = yes > LabelFormat = "SystemDiff-" > } > Pool { > Name = "SystemIncrPool" > Storage = "SystemStorage" > Pool Type = Backup > Recycle = yes > AutoPrune = yes > Volume Retention = 1 week > Volume Use Duration = 1 day > Recycle Oldest Volume = yes > LabelFormat = "SystemIncr-" > } > It is even more advanced than including single files, for example you could use something like: @|"sh -c 'for f in /etc/bacula/clients.d/*.conf ; do echo @${f} ; done'" which would include all *.conf files in /etc/bacula/clients.d/ We use that to allow different admins to edit configurations only for their clients... Of course you can use any external command here; for example you could call perl script using DBI which would generate all or part of your config files from SQL database or for example from nagios configuration files or whatever... -- Matija Nalis Odjel racunalno-informacijskih sustava i servisa Hrvatska akademska i istrazivacka mreza - CARNet Josipa Marohnica 5, 10000 Zagreb tel. +385 1 6661 616, fax. +385 1 6661 766 www.CARNet.hr ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users