Advanced Backup Verification: Script Validation


This article describes the Script Validation component of advanced screenshot verification.


  • Datto SIRIS
  • Datto ALTO


Datto appliances leverage a new screenshot verification engine. This modern 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.
Service Verification and Script Verification are incompatible with Virtual SIRIS on Hyper-V; they will not run even if configured to do so.


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 Exchange server could be checked to validate that its services are enabled and the database is accessible. Several example PowerShell scripts for Windows are available for you to download from the Datto Downloads page; you can also develop custom scripts.


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

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

  • CheckDatabase: 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


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 would receive an email notification that the check did not complete successfully.

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

Additional Resources