A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/azure/backup/backup-azure-linux-app-consistent below:

Configure application-consistent backup for Azure Linux VMs using Azure Backup - Azure Backup

This article describes how to create application-consistent backups for Azure-deployed Linux VMs using Azure Backup. It covers configuring the script framework and troubleshooting.

When Azure Backup takes snapshot of a VM, application consistency ensures that applications start correctly after VM restoration. To achieve this, use the Linux prescript and post-script framework, which supports Azure Resource Manager-deployed Linux VMs. However, these scripts don't work for Service Manager-deployed or Windows VMs.

How the framework works?

The framework provides an option to run custom prescripts and post-scripts while you're taking VM snapshots. Prescripts run just before you take the VM snapshot, and post-scripts run immediately after you take the VM snapshot. Prescripts and post-scripts provide the flexibility to control your application and environment, while you're taking VM snapshots.

Prescripts invoke native application APIs, which quiesce the IOs, and flush in-memory content to the disk. These actions ensure the snapshot is application consistent. Post-scripts use native application APIs to thaw the IOs, which enable the application to resume normal operations after the VM snapshot.

Configure prescript and post-script for Azure Linux VM

To configure Prescript and post-script, follow these steps:

  1. Sign in as the root user to the Linux VM that you want to back up.

  2. From GitHub, download VMSnapshotScriptPluginConfig.json and copy it to the /etc/azure folder for all VMs you want to back up. If the /etc/azure folder doesn't exist, create it.

  3. Copy the prescript and post-script for your application on all VMs you plan to back up. You can copy the scripts to any location on the VM. Be sure to update the full path of the script files in the VMSnapshotScriptPluginConfig.json file.

  4. To use the following files, ensure that you have the corresponding permissions:

    Important

    The framework gives users numerous power. Secure the framework, and ensure only root user has access to critical JSON and script files. If the requirements aren't met, the script won't run, which results in a file system crash and inconsistent backup.

  5. Configure VMSnapshotScriptPluginConfig.json as described here:

  6. The script framework is now configured. If the VM backup is already configured, the next backup invokes the scripts and triggers application-consistent backup. If the VM backup isn't configured, configure it by using Back up Azure virtual machines to Recovery Services vaults.

Troubleshoot Azure Linux VM application-consistent backup errors

Make sure you add appropriate logging while writing your prescript and post-script, and review your script logs to fix any script issues. If you still have problems running scripts, refer to the following table for more information.

Error Error message Recommended action Pre-ScriptExecutionFailed The prescript returned an error, so backup might not be application-consistent. Look at the failure logs for your script to fix the issue. Post-ScriptExecutionFailed The post-script returned an error that might impact application state. Look at the failure logs for your script to fix the issue and check the application state. Pre-ScriptNotFound The prescript wasn't found at the location that's specified in the VMSnapshotScriptPluginConfig.json config file. Make sure that prescript is present at the path that's specified in the config file to ensure application-consistent backup. Post-ScriptNotFound The post-script wasn't found at the location that's specified in the VMSnapshotScriptPluginConfig.json config file. Make sure that post-script is present at the path that's specified in the config file to ensure application-consistent backup. IncorrectPluginhostFile The Pluginhost file, which comes with the VmSnapshotLinux extension, is corrupted, so prescript and post-script can't run and the backup won't be application-consistent. Uninstall the VmSnapshotLinux extension, and it will automatically be reinstalled with the next backup to fix the problem. IncorrectJSONConfigFile The VMSnapshotScriptPluginConfig.json file is incorrect, so prescript and post-script can't run and the backup won't be application-consistent. Download the copy from GitHub and configure it again. InsufficientPermissionforPre-Script For running scripts, root user should be the owner of the file and the file should have 700 permissions (that is, only owner should have read, write, and execute permissions). Make sure root user is the owner of the script file and that only owner has read, write and execute permissions. InsufficientPermissionforPost-Script For running scripts, root user should be the owner of the file and the file should have 700 permissions (that is, only owner should have read, write, and execute permissions). Make sure root user is the owner of the script file and that only owner has read, write and execute permissions. Pre-ScriptTimeout The execution of the application-consistent backup pre-script timed-out. Check the script and increase the time-out in the VMSnapshotScriptPluginConfig.json file that's located at /etc/azure. Post-ScriptTimeout The execution of the application-consistent backup post-scripts timed out. Check the script and increase the time-out in the VMSnapshotScriptPluginConfig.json file that's located at /etc/azure. Next steps

Configure VM backup to a Recovery Services vault


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4