Bacula-users

[Bacula-users] Suggestion for dynamic hard drive fileset

2008-04-09 13:00:54
Subject: [Bacula-users] Suggestion for dynamic hard drive fileset
From: "Robert Garza" <azragbeebop AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 9 Apr 2008 11:11:17 -0500
We are currently in the testing stage of deploying a production bacula setup in one of our datacenters for production use.  I have come up with a few scripts to dynamically detect which drives/mount points for bacula to backup.  Below are the linux, Solaris and Windows server 2k3 (x86/x64) scripts that I have written to assist with the process.

#For linux/solaris:
/etc/bacula/conf.d/scripts

./client_partitions

#!/bin/bash
df -l | awk '{print $6}'

/etc/bacula/conf.d/filesets
./linux_fileset.conf
FileSet {
  Name = "Linux"
  Include {
    Options {
      signature = MD5
    }
    File = "|/etc/bacula/conf.d/scripts/client_partitions"
  }
  Exclude {
    File = /dev
    File = /proc
    File = /tmp
    File = /sys
    File = /.journal
    File = /.fsck
  }
}


#For Windows Server 2k3:

drive_list.vbs      #under C:\bacula, or whatever default location we decide

Option Explicit
Dim objWMIService, objItem, colItems, StrComputer

On Error Resume Next
strComputer = "."

Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_LogicalDisk Where DriveType = '3'")

For Each objItem in colItems
Wscript.Echo objItem.deviceid
Next

FileSet {
  Name = "Windows Set"
  Include {
    Options {
      signature = MD5
    }
      File = "\\|C:/Bacula/drive_list.vbs"
#     File = C:/
#     File = E:/
  }
}

For some reason, the _vbscript_ works on some servers with no errors, but fails to complete on others.  I was able to determine that on the Windows Servers that aren't able to complete the script, when run manually, a dialog box appears requiring user intervention ("click on ok") to continue.  Would anybody know how to get around this issue and create something that should list out the logical hard drive letters accross all servers?

Regards,
Robert Garza
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>