Kaseya Community

Post Script Exchange 2007

  • This script will purge Exchange transaction Logs older than two days old. It is intended to be used as a "post" script after backup.

    You will need forfiles.exe from the win2k resource kit.

    You can download from here:
    http://winhlp.com/node/180

    I'm not sure why forfiles.exe isn't in the 2k3 resource kit, but nonetheless...
    -------------------------
    Script Name: Exch2007 Purge Trans Logs
    Script Description: This script runs after Exchange 2007 Backup. It purges old Transaction logfiles greater than 2 days old.

    IF True
    THEN
    Get Variable
    Parameter 1 : 2
    Parameter 2 : "D:\Exchange Server\First Storage Group\Transaction Logs"
    Parameter 3 : LogPath
    OS Type : 0
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : atemp
    OS Type : 0
    Write File
    Parameter 1 : #atemp#\forfiles.exe
    Parameter 2 : VSASharedFiles\BIN\2K3Rkit\forfiles.exe
    OS Type : 0
    Execute File
    Parameter 1 : #atemp#\forfiles.exe
    Parameter 2 : /p #LogPath# /m *.LOG /D -2 /c "cmd /c echo deleting @file >>>>#atemp#\purgelog.txt & del @file"
    Parameter 3 : 1
    OS Type : 0
    Get File
    Parameter 1 : #atemp#\purgelog.txt
    Parameter 2 : Transaction_Log_Purge.txt
    Parameter 3 : 1
    OS Type : 0
    Delete File
    Parameter 1 : #atemp#\purgelog.txt
    OS Type : 0
    ELSE

    Legacy Forum Name: Post Script Exchange 2007,
    Legacy Posted By Username: myArch-man
  • Cuz it's part of 2k3 server... Duh.. Smile

    Legacy Forum Name: BU-DR,
    Legacy Posted By Username: myArch-man
  • Umm ... has Exchange said those logs have been rolled up?! Eek

    Legacy Forum Name: BU-DR,
    Legacy Posted By Username: justin4dti
  • The checkpoint usually gets updated frequently enough that parsing out log files older than 2 days isn't a problem.


    for recovering from the last checkpoint:

    ESEUTIL /r enn /L[path to log files] /s[path to checkpoint file] /d[path to database file] /i

    Legacy Forum Name: BU-DR,
    Legacy Posted By Username: myArch-man
  • I haven't tried this myself yet but figured I would share with the class.

    http://blog.crowe.co.nz/archive/2008/06/02/Windows-Server-2008--Exchange-Server-2007--NO-SUPPORTED.aspx

    Legacy Forum Name: BU-DR,
    Legacy Posted By Username: bent