Skip to content

Commit 762d341

Browse files
authored
Merge pull request #298241 from AbhishekMallick01/Apr-15-2025-Freshness
Freshness - Application consistent backup of Azure Linux VMs
2 parents 41479ad + 190a1b5 commit 762d341

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

articles/backup/backup-azure-linux-app-consistent.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
2-
title: Application-consistent backups of Linux VMs using Azure Backup
3-
description: Create application-consistent backups of your Linux virtual machines to Azure. This article explains configuring the script framework to back up Azure-deployed Linux VMs. This article also includes troubleshooting information.
2+
title: Configure application-consistent backup for Azure Linux VMs using Azure Backup
3+
description: Learn how to create application-consistent backups for Azure-deployed Linux VMs using Azure Backup.
44
ms.service: azure-backup
55
ms.topic: how-to
66
ms.custom: linux-related-content, engagement-fy24
7-
ms.date: 04/23/2024
7+
ms.date: 04/15/2025
88
author: jyothisuri
99
ms.author: jsuri
1010
---
1111

12-
# Application-consistent backup of Azure Linux VMs using Azure Backup
12+
# Configure application-consistent backup for Azure Linux VMs using Azure Backup
1313

14-
This article describes how to create application-consistent backups of your Linux Virtual Machines to Azure by using Azure Backup. In this article, you'll configure the script framework to back up Azure-deployed Linux VMs. This article also provides the troubleshooting information.
14+
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.
1515

16-
When you take backup snapshots of VMs, application consistency means your applications start when the VMs boot after being restored. As you can imagine, application consistency is extremely important. To ensure your Linux VMs are application consistent, you can use the Linux prescript and post-script framework to take application-consistent backups. The prescript and post-script framework supports Azure Resource Manager-deployed Linux virtual machines. Scripts for application consistency don't support Service Manager-deployed virtual machines or Windows virtual machines.
16+
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.
1717

18-
## How the framework works
18+
## How the framework works?
1919

2020
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.
2121

@@ -31,16 +31,16 @@ To configure Prescript and post-script, follow these steps:
3131

3232
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.
3333

34-
4. Ensure the following permissions for these files:
34+
4. To use the following files, ensure that you have the corresponding permissions:
3535

36-
- **VMSnapshotScriptPluginConfig.json**: Permission 600.” For example, only root user should have read and write permissions to this file, and no user should have execute permissions.
36+
- **VMSnapshotScriptPluginConfig.json**: Permission **600**. For example, only **root** user should have **read** and **write** permissions to this file, and no user should have **execute** permissions.
3737

38-
- **Pre-script file**: Permission 700.” For example, only root user should have read”, “write, and execute permissions to this file. The file is expected to be a shell script but theoretically this script can internally spawn or refer to other scripts like a Python script.
38+
- **Pre-script file**: Permission **700**. For example, only **root** user should have **read**, **write**, and **execute** permissions to this file. The file is expected to be a shell script but theoretically this script can internally spawn or refer to other scripts like a Python script.
3939

40-
- **Post-script** Permission 700.” For example, only root user should have read”, “write, and execute permissions to this file. The file is expected to be a shell script but theoretically this script can internally spawn or refer to other scripts like a Python script.
40+
- **Post-script** Permission **700**. For example, only **root** user should have **read**, **write**, and **execute** permissions to this file. The file is expected to be a shell script but theoretically this script can internally spawn or refer to other scripts like a Python script.
4141

4242
> [!IMPORTANT]
43-
> The framework gives users a lot of power. Secure the framework, and ensure only root user has access to critical JSON and script files.
43+
> The framework gives users numerous power. Secure the framework, and ensure only **root** user has access to critical JSON and script files.
4444
> If the requirements aren't met, the script won't run, which results in a file system crash and inconsistent backup.
4545
>
4646
@@ -59,7 +59,7 @@ To configure Prescript and post-script, follow these steps:
5959

6060
- **postScriptNoOfRetries**: Set the number of times the post-script should be retried if there's any error before terminating. Zero means only one try and no retry if there's a failure.
6161

62-
- **timeoutInSeconds**: Specify individual timeouts for the prescript and the post-script (maximum value can be 1800).
62+
- **timeoutInSeconds**: Specify individual time-outs for the prescript and the post-script (maximum value can be 1800).
6363

6464
- **continueBackupOnFailure**: Set this value to **true** if you want Azure Backup to fall back to a file system consistent/crash consistent backup if prescript or post-script fails. Setting this to **false** fails the backup if there's a script failure (except when you have a single-disk VM that falls back to crash-consistent backup regardless of this setting). When the **continueBackupOnFailure** value is set to false, if the backup fails the backup operation will be attempted again based on a retry logic in service (for the stipulated number of attempts).
6565

@@ -69,7 +69,7 @@ To configure Prescript and post-script, follow these steps:
6969

7070
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.](./backup-azure-vms-first-look-arm.md)
7171

72-
## Troubleshooting
72+
## Troubleshoot Azure Linux VM application-consistent backup errors
7373

7474
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.
7575

@@ -79,12 +79,12 @@ Make sure you add appropriate logging while writing your prescript and post-scri
7979
|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. |
8080
| 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.|
8181
| 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.|
82-
| 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. |
82+
| 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. |
8383
| 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](https://github.com/MicrosoftAzureBackup/VMSnapshotPluginConfig) and configure it again. |
84-
| 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. |
85-
| 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. |
86-
| Pre-ScriptTimeout | The execution of the application-consistent backup pre-script timed-out. | Check the script and increase the timeout in the **VMSnapshotScriptPluginConfig.json** file that's located at **/etc/azure**. |
87-
| Post-ScriptTimeout | The execution of the application-consistent backup post-scripts timed out. | Check the script and increase the timeout in the **VMSnapshotScriptPluginConfig.json** file that's located at **/etc/azure**. |
84+
| 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. |
85+
| 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. |
86+
| 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**. |
87+
| 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**. |
8888

8989
## Next steps
9090

0 commit comments

Comments
 (0)