Configuring Pre- and Post-Processing Scripts Using VMware Tools

Last post 02-02-2017, 3:21 PM by Victor Ma. 7 replies.
Sort Posts: Previous Next
  • Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 12-21-2016, 10:29 AM

    Following http://documentation.commvault.com/commvault/v11/article?p=products/vs_vmware/t_vmw_config_pre_post_snap_script.htm

    "On Linux virtual machines, the script /usr/sbin/pre-freeze-script is executed when the software snapshot is created and /usr/sbin/post-thaw-script is executed when the software snapshot is removed. Ensure that these scripts are executable by the VMware tools user."

     

    So I create the following test, let’s see what happens after scheduled backup tonight:


    [root@myhost sbin]# pwd ; ls -l pre-freeze-script.sh post-thaw-script.sh

    /usr/sbin

    -rwxr-xr-x. 1 root root 27 Dec 20 16:17 post-thaw-script.sh

    -rwxr-xr-x. 1 root root 29 Dec 20 16:16 pre-freeze-script.sh

     

    [root@myhost sbin]# pwd ; cat pre-freeze-script.sh post-thaw-script.sh

    /usr/sbin

    date >> /tmp/freeze_time.log

    date >> /tmp/thaw_time.log

     
    I manually tested running it twice yesterday, they all worked.


    [root@myhost sbin]# ls -l /tmp/*time.log

    -rw-r--r--. 1 root root 58 Dec 20 16:18 /tmp/freeze_time.log

    -rw-r--r--. 1 root root 58 Dec 20 16:18 /tmp/thaw_time.log

    [root@myhost sbin]# cat /tmp/freeze_time.log

    Tue Dec 20 16:17:51 EST 2016

    Tue Dec 20 16:18:52 EST 2016

    [root@myhost sbin]# cat /tmp/thaw_time.log

    Tue Dec 20 16:18:34 EST 2016

    Tue Dec 20 16:18:57 EST 2016

    There is overnight backup:-

    This morning, I found the script wasn't runned.

    [root@myhost sbin]# date ; cat /tmp/freeze_time.log /tmp/thaw_time.log
    Wed Dec 21 10:24:35 EST 2016
    Tue Dec 20 16:17:51 EST 2016
    Tue Dec 20 16:18:52 EST 2016
    Tue Dec 20 16:18:34 EST 2016
    Tue Dec 20 16:18:57 EST 2016

    How do I troubleshoot first? Thanks for your help!

  • Re: Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 12-23-2016, 5:52 AM

    Hi Victor,

    how did you test ?
    the /tmp files are owned by root in your screenshot and "ro" to all other user.
    what user are you using to execute the pre/post scripts during backup ?

    remove the "log" files from tmp and they will be recreated if the backup successfully runs the scripts

    can you please add the full path to the "date" command in the script as well ? 

    regards
    Klaus 

  • Re: Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 12-23-2016, 12:44 PM

    Good point, I made the change here, and will find out if it works tomorrow.

    [root@myhost sbin]# pwd ; cat pre-freeze-script.sh post-thaw-script.sh
    /usr/sbin
    /usr/bin/date >> /tmp/freeze_time.log
    /usr/bin/date >> /tmp/thaw_time.log

    [root@myhost sbin]# ls -l /tmp/*_time.log ; rm /tmp/*_time.log ; ls -l /tmp/*_time.log
    -rw-r--r--. 1 root root 58 Dec 20 16:18 /tmp/freeze_time.log
    -rw-r--r--. 1 root root 58 Dec 20 16:18 /tmp/thaw_time.log
    rm: remove regular file ‘/tmp/freeze_time.log’? Y
    rm: remove regular file ‘/tmp/thaw_time.log’? Y
    ls: cannot access /tmp/*_time.log: No such file or directory

  • Re: Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 12-29-2016, 11:42 AM

    Update: Since the log files wasn't even created, I believe this pre and post scripts actually have never run by my scheduled backup jobs. 

    [root@myhost sbin]#  date ; cat /tmp/freeze_time.log /tmp/thaw_time.log
    Thu Dec 29 11:35:07 EST 2016
    cat: /tmp/freeze_time.log: No such file or directory
    cat: /tmp/thaw_time.log: No such file or directory

  • Re: Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 12-30-2016, 4:36 AM

    Hi Victor,

    Too bad I didn't see it ealier, but:

    <...>
    On Linux virtual machines, the script /usr/sbin/pre-freeze-script is executed when the software snapshot is created and /usr/sbin/post-thaw-script is executed when the software snapshot is removed
    <...>

    and NOT  /usr/sbin/pre-freeze-script.sh !!!

    please rename your scripts according to the documentation and try again (remove the .sh extention)

    regards
    Klaus 

  • Re: Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 01-09-2017, 10:37 AM

    Thanks, Klaus. I have atually noticed that and renamed the scripts shortly after, but it still doesn't work. What should I do next?

    [root@myhost ~]# ls -l /usr/sbin/pre-freeze-script /usr/sbin/post-thaw-script
    -rwx------. 1 root root 46 Dec 29 16:02 /usr/sbin/post-thaw-script
    -rwx------. 1 root root 47 Dec 29 16:02 /usr/sbin/pre-freeze-script
    [root@myhost ~]# date ; cat /tmp/freeze_time.log /tmp/thaw_time.log
    Mon Jan  9 10:35:37 EST 2017
    cat: /tmp/freeze_time.log: No such file or directory
    cat: /tmp/thaw_time.log: No such file or directory
    [root@myhost ~]#

  • Re: Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 01-11-2017, 4:33 PM

    It is actually a VMWare issue. The doc CommVAult provided is simply a re-post of VMware tools documentation found here:
    https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006671

  • Re: Configuring Pre- and Post-Processing Scripts Using VMware Tools
    Posted: 02-02-2017, 3:21 PM

    VMWare actually doesn't support it anymore since ESX 5x, after they stop provide VMWare tools, and suggest to use open VMTools.

    CommVault is aware of that, and since this function play an very important role on EPIC CAche Database backup, I suggest them remove the following document: http://documentation.commvault.com/commvault/v10/article?p=products/intersystems/c_intersystems_virtual_overview.htm

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2017 Commvault | All Rights Reserved. | Legal | Privacy Policy