Description

This article explains how to set Pre and Post-Snapshot scripts on a Cloud Server that has been enabled for the Cloud Server Snapshot feature.

Prerequisites that are enforced by the system:

  1. The User must be a Primary Administrator or have the Server role.
  2. The server must be enabled for Snapshots
  3. Snapshot Service is NORMAL
    1. NOT in either PENDING_MAINTENANCE or MAINTENANCE
  4. If Pre and Post Snapshot Scripts are being disabled
    1. There cannot be a Manual Snapshot in progress
  5. Script credentials - Username/password must be provided if either pre-snapshot or post-snapshot script path is provided
  6. Pre-Snapshot Script timeout value must be a minimum of 1 second and a maximum of 1800 Seconds (30 minutes)
  7. VMware Tools or Open VM Tools must be running on the Cloud Server and should be up-to-date.
  8. In order to disable Pre and/or Post-snapshot scripts, there cannot be a Manual Snapshot in progress

Other Prerequisites that are required for proper functionality, but are not enforced by the system:

  1. Supported OS:
    1. Windows 2008 and newer
    2. Windows 8 and newer
    3. RedHat/CentOS 5.11 and newer
    4. Ubuntu 12.04 and newer
  2. Supported File Systems:
    1. NTFS
    2. Ext2 / Ext3 / Ext4
    3. freebsd-us
    4. hfs / hfsplus
    5. jfs
    6. minix
    7. msdos
    8. qnz4
    9. Reiserfs
    10. ufs
    11. vfat
    12. xfs
  3. Username/Password must have write access to the Target File or Folder
    1. Linux - Account must have Write permission for the restore location
      1. User account with no shell access should be provided.
    2. Windows - Account must have administrator privileges on the Guest
      1. Domain may be supplied for windows machine if its part of AD/LDAP
  4. Pre and/or Post Snapshot Script files must exist on the Source Server

    Important Note

    Since these Preconditions are not enforced by the system, if the Snapshot fails, you will need to manually verify that the prerequisites are being met.

Content / Solution:

Set Pre and/or Post Snapshot Scripts

  1. From the Home page, select the Data Center where the Server on which you want to set Pre and Post Snapshot Scripts is located:


  2. The Data Center Dashboard will be displayed. Select the Network Domain where the Server is located:


  3. The Network Domain dashboard will be displayed. Click on the Server:


  4. The Server dashboard will be displayed. Click on the Snapshots tab, then click on the Actions menu and select Set Pre and Post Snapshot Scripts from the drop-down menu:


  5. The Set Pre and Post Snapshot Scripts dialog will be displayed:


  6. Select whether you want to set a Pre-Snapshot script, a Post-Snapshot script, or both:


  7. Fill out the form with the desired information, then click Set Pre and Post Snapshot Scripts:

    • Pre-Snapshot Script - The system will attempt to initiate this script prior to taking a snapshot
      • File Path on the Server - The absolute path to the script that will be executed before the Snapshot is taken
      • Description - Optional description of the Pre-Snapshot script
      • Failure Handling - What to do if the script fails.
        • CONTINUE - Continue with the Snapshot even if the Script fails to run
        • ABORT - Abort the Snapshot if the Script fails to run
          • Note: Aborting the Snapshot will cause the Snapshot to fail. There will be no log of why the failure occurred.
      • Script Timeout - Defines the amount of time to wait for the script finish. If it does not finish within this timeframe, the system considers the script to be failed
    • Post-Snapshot Script - The system will attempt to initiate this script AFTER attempting to take a snapshot regardless of whether or not the snapshot succeeded
      • File Path on the Server - The absolute path to the script that will be executed after the Snapshot is taken
      • Description - Optional description of the Post-Snapshot script
        • Note: if the Pre-Snapshot script is aborted, or if the snapshot fails, the post-script will still run
    • Guest OS Username - Username used by the system to login to the server via VM Tools for this function
    • Password - Password to login to the server via VM Tools for this function

  8. The system will be updated with the changes:

    Important Note

    If the Snapshot fails, you will need to manually verify that all prerequisites are being met, then try again.

Disable Pre and/or Post Snapshot Scripts

  1. Click on the Snapshots tab, then click on the Actions menu and select Set Pre and Post Snapshot Scripts from the drop-down menu:


  2. The Set Pre and Post Snapshot Scripts dialog will be displayed:


  3. Un-check the checkbox for the script that you want to disable, either Pre-snapshot, Post-snapshot, or both, and then click Set Pre and Post Snapshot Scripts:


  4. The system will display a success message:


  5. The Pre and/or Post-snapshot scripts will be disabled: