Storm season is back, bringing with it the potential for significant weather events. If you have clients in areas prone to infrastructure disruption, visit the Disaster Recovery Resources guide for preparedness information. Datto recommends performing proactive disaster recovery testing to mitigate potential downtime. See our articles about the importance of disaster recovery testing and Preparing For A Cloud Virtualization Test: Policies, Procedures, And Partner Responsibilities to learn more. For live updates, follow @datto on Twitter.

Advanced Backup Verification: Script Validation

Follow

Topic

This article describes the Script Validation component of advanced screenshot verification. This feature is only available on Datto appliances running Ubuntu 16.04.

Environment

  • Datto SIRIS
  • Datto ALTO

Overview

Datto appliances leverage a new screenshot verification engine. This new architecture is faster, more accurate, and less resource-intensive than the first generation of screenshot verification. It also includes the ability to perform additional validations during the screenshot process to further help in verifying backup integrity.

Use script verification with caution. Only deploy scripts in the virtual environment of your Datto appliance. Datto offers template scripts as examples only, and is unable to provide support for custom scripting or any unexpected behavior of your production environment as a result of the deployment of a custom script.

Description

Advanced Screenshot Verification introduces Script Validation, which allows the appliance to execute scripts upon screenshot verification. As an example, a SQL database could be checked to validate that a given table returns the correct number of rows, or an Exchange server could be checked to validate it can connect to Active Directory. Several example PowerShell scripts for Windows are available for you to download from the Datto Downloads page; you can also develop your own scripts.

Procedure

You can configure backup verification scripting by navigating to the Protect → Configure Agent Settings → Verification → Backup Verification section of the Datto appliance GUI. Use the Upload Scripts button to add the scripts to the protected agent's profile, as shown in Figure 1. Upload the scripts in the order in which they need to run. The scripts will run during the agent's scheduled screenshot verification window.

Figure 1: Upload scripts (click for larger image)


There are three script verification templates available for download at http://download.datto.com/#scripts, which you can use to create your own scripts. They are:

  • Check Database: Validates that a designated table in a database returns a specified number of rows.
  • Check Web App: Validates that a web application is running, and returns the app homepage.
  • Check Service: Validates that a designated Windows service is available upon boot.
For Linux agents only: create the scripts in the Linux environment itself, or remove the CRLF characters from the script before implementing it. Otherwise, the characters will make the script fail to run.

After the verification script runs, and the screenshot completes, the Datto appliance will display the results of the verification in the Manage Recovery Points page of the device GUI, under the Screenshot Verification column. You will receive a "Script Succeeded" or a "Script Failed" message. Clicking the Show Log dropdown will provide more detail about the outcome of the script test.

Figure 2: Verification Log excerpt

FAQ

Q: At what point do the scripts run?
A: The scripts will run during the agent's scheduled screenshot verification window.

Q: Is PowerShell the only scripting language that is compatible with Advanced Screenshot Verification?
A: Advanced Screenshot Verification is compatible with PowerShell scripting for Windows only and Bash scripting for Linux only.

Q: Can we trigger an email alert if the script returns a fail?
A: The Datto appliance considers a screenshot to have failed if one or more of its pass conditions does not succeed. If a script fails, but the screenshot boots successfully, the device will consider the verification to have failed. If you configured the appliance's alerts to notify you of screenshot failures, you will receive an email notification that the verification did not complete successfully.

Q: What script functions does the Datto appliance itself interpret?
A: The Datto appliance only interprets whether the exit code is 0 (success) or anything other than (failure).

Additional Resources


Was this article helpful?

0 out of 5 found this helpful

You must sign in before voting on this article.

Want to talk about it? Head on over to our Community Forum!