Dimitri,

Another possibility would be to wake up the client using ether-wake.
You could ping the workstation to see if it's online... wake it up
when it's not... make a backup... and power it down again. This way
the backup would be guaranteed to run each day. Has anybody done a
successful job at setting up something like this?

Yes, I have a setup like this working. I include the details below in case this is useful to someone else.

Yours,

Chris Rodgers.

--------------------------------------------------------------------

Server: Fedora Core 4
Client: Windows XP Home (with Fast User Switching)

I used CYGWIN (http://www.cygwin.com/) for some of the client-side scripting.

Currently, I have the PCs switch on using the BIOS clock. I also tried using

perl -MNet::Wake -e "Net::Wake::by_udp('255.255.255.255','<MAC ADDRESS GOES HERE>',<PORT NUMBER GOES HERE>)"

in "Run Before Job".

I use the following settings in my bacula-dir.conf:

Job {
  Name = "Ngorongoro"
  Client = ngorongoro-fd
  JobDefs = "DefaultJob"
  FileSet = "DocumentsAndSettings"
  Write Bootstrap = "/var/bacula/Ngorongoro.bsr"
  ClientRunAfterJob = "C:/cygwin/home/Admin/smartshutdown.bat"
}

Job {
  Name = "Ngorongoro-SystemState"
  Client = ngorongoro-fd
  JobDefs = "DefaultJob"
  FileSet = "SystemState"
  Write Bootstrap = "/var/bacula/Ngorongoro-SystemState.bsr"
  ClientRunBeforeJob = "C:/cygwin/bin/backupsystemstate.bat"
  Priority = 9 # Do this before all the files are sent.
}

# File set for ngorongoro
FileSet {
  Name = "DocumentsAndSettings"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
      Exclude = yes
      IgnoreCase = yes

   # Exclude Mozilla-based programs' file caches
WildDir = "[A-Z]:/Documents and Settings/*/Application Data/*/Profiles/*/*/Cache" WildDir = "[A-Z]:/Documents and Settings/*/Application Data/*/Profiles/*/*/Cache.Trash" WildDir = "[A-Z]:/Documents and Settings/*/Application Data/*/Profiles/*/*/ImapMail"

   # Exclude user's registry files - they're always in use anyway.
WildFile = "[A-Z]:/Documents and Settings/*/Local Settings/Application Data/Microsoft/Windows/usrclass.*"
   WildFile = "[A-Z]:/Documents and Settings/*/ntuser.*"

   # Exclude directories full of lots and lots of useless little files
   WildDir = "[A-Z]:/Documents and Settings/*/Cookies"
   WildDir = "[A-Z]:/Documents and Settings/*/Recent"
   WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/History"
   WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temp"
WildDir = "[A-Z]:/Documents and Settings/*/Local Settings/Temporary Internet Files"

   # These are always open and unable to be backed up
#WildFile = "[A-Z]:/Documents and Settings/All Users/Application Data/Microsoft/Network/Downloader/qmgr[01].dat"

   # Some random bits of Windows we want to ignore
   #WildFile = "[A-Z]:/WINDOWS/security/logs/scepol.log"
   #WildDir = "[A-Z]:/WINDOWS/system32/config"
   WildDir = "[A-Z]:/WINDOWS/msdownld.tmp"
   WildDir = "[A-Z]:/WINDOWS/Internet Logs"
   WildDir = "[A-Z]:/WINDOWS/$Nt*Uninstall*"
   WildDir = "[A-Z]:/WINDOWS/sysvol"
   WildFile = "[A-Z]:/WINDOWS/cluster/CLUSDB"
   WildFile = "[A-Z]:/WINDOWS/cluster/CLUSDB.LOG"
   WildFile = "[A-Z]:/WINDOWS/NTDS/edb.log"
   WildFile = "[A-Z]:/WINDOWS/NTDS/ntds.dit"
   WildFile = "[A-Z]:/WINDOWS/NTDS/temp.edb"
   WildFile = "[A-Z]:/WINDOWS/ntfrs/jet/log/edb.log"
   WildFile = "[A-Z]:/WINDOWS/ntfrs/jet/ntfrs.jdb"
   WildFile = "[A-Z]:/WINDOWS/ntfrs/jet/temp/tmp.edb"
   WildFile = "[A-Z]:/WINDOWS/system32/CPL.CFG"
   WildFile = "[A-Z]:/WINDOWS/system32/dhcp/dhcp.mdb"
   WildFile = "[A-Z]:/WINDOWS/system32/dhcp/j50.log"
   WildFile = "[A-Z]:/WINDOWS/system32/dhcp/tmp.edb"
   WildFile = "[A-Z]:/WINDOWS/system32/LServer/edb.log"
   WildFile = "[A-Z]:/WINDOWS/system32/LServer/TLSLic.edb"
   WildFile = "[A-Z]:/WINDOWS/system32/LServer/tmp.edb"
   WildFile = "[A-Z]:/WINDOWS/system32/wins/j50.log"
   WildFile = "[A-Z]:/WINDOWS/system32/wins/wins.mdb"
   WildFile = "[A-Z]:/WINDOWS/system32/wins/winstmp.mdb"

   # Temporary directories & files
   WildDir = "[A-Z]:/WINDOWS/Temp"
   WildDir = "[A-Z]:/temp"
   WildFile = "*.tmp"
   WildDir = "[A-Z]:/tmp"
   WildDir = "[A-Z]:/var/tmp"

   # Recycle bins
   WildDir = "[A-Z]:/RECYCLER"

   # Swap files
   WildFile = "[A-Z]:/pagefile.sys"
   WildFile = "[A-Z]:/hiberfil.sys"
    }

# Ideally, we'd back up the entire disk, but there's not enough space for that.
  File = "C:/Documents and Settings"
  #File = "C:/"
  }

Exclude {
  File = "C:/systemstate.bkf"
  }
}

# Backup the registry, etc. on windows
FileSet {
  Name = "SystemState"
  Enable VSS = yes
  Include {
    Options {
      signature = MD5
      compression = GZIP
    }

  File = "C:/systemstate.bkf"
  }
}

########################

On the client, I use these files to capture the windows registry and to shut the machine down after the backup (providing that no-one is logged on locally). These scripts use CYGWIN (from http://www.cygwin.com/setup.exe). The psshutdown.exe tool comes from http://www.sysinternals.com/). NTbackup is provided with Windows.

$ cat smartshutdown.bat
@echo off

SET CYGWIN=ntea tty

C:
chdir C:\cygwin\bin

bash --login C:\cygwin\home\admin\smartshutdown

exit 0

$ cat smartshutdown
#!/bin/bash

if [ `qwinsta.exe | grep -v '^>console 0 Conn wdcon' | wc -l` -lt 2 ]; then

  echo "No sessions are currently active. Starting shutdown!"
  cd /cygdrive/c/WINDOWS/system32
./psshutdown.exe -c -k -t 60 -m "The system has finished its nightly backup."
else
  echo "Users are logged on - aborting shutdown!";
fi

$ cat backupsystemstate.bat
C:
cd \
del C:\systemstate.bkf

ntbackup backup systemstate /F c:\systemstate.bkf

exit 0



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to