How Do I Use Quiescing Scripts with Linux Agents on a Datto Appliance?

Question

How do I use quiescing scripts with Linux agents on a Datto appliance?

Environment

  • Datto ALTO
  • Datto SIRIS

Answer

Quiescing scripts allow processes on a protected Linux system, including databases and other applications, to be paused or modified during a backup to ensure application-consistent snapshots that include pending transactions. Datto provides three default scripts that you can configure to work with MongoDB, MySQL or PostgreSQL. You can also create custom quiescing scripts.

The Datto Linux Agent stores its script files in /etc/datto/dla/pps on the protected server.

Procedure

To activate the quiescing scripts:

  1. Open the GUI for the Datto device.
  2. Click the Protect tab.
  3. Find the agent that you wish to configure.
  4. Click Configure Agent Settings for that agent.
  5. Scroll to the Advanced section to find the Quiescing Scripts option.
  6. Check the boxes next to the scripts you want to activate.

Configuring MongoDB

To configure MongoDB, nano /etc/datto/dla/pps/mongodb.sh, and replace all instances of the name admin with the name of your database. After updating the file, save the changes, and exit the editor.


Figure 1:MongoDB

Configuring MySQL

To configure MySQL, nano /etc/datto/dla/pps/mysql.sh, and enter the username and password of your SQL database in the u= and P= fields


Figure 2: mysql.sh

Configuring PostgreSQL

You can optionally nano /etc/datto/dla/pps/postgres.sh and add the --dbname=DBNAMEmodifier to the postgres commands. To change databases. Replace DBNAMEwith the name of your database.


Figure 3: Postgre

Custom Quiescing Scripts

You can use any of these templates to create custom quiescing scripts. You must store scripts in /etc/datto/dla/pps/.

The script needs to be able to operate on these options:

elif [ $1 = "PRE" ]; then
elif [ $1 = "POST" ]; then

In addition, use chmod to make your script executable:

chmod +x /etc/datto/dla/pps/[example script].sh

Make sure the script has the same permissions as the other scripts in the directory (Access: (0755/-rwxr-xr-x)). In the Datto appliance GUI, navigate to the Quiescing Scripts section of the protected agent's Configure Agent Settings. Click Refresh Scripts, and the new script will show up as an option in the list.

Additional Resources

Pause or resume a database mirroring session (external link)