[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Backup](../../index.md) > [Step-by-step guides](../index.md) > BareMetal in Cloud Backup > Restoring the Cloud Backup agent

# Recovering the Cloud Backup agent after a Linux kernel update


Updating the Linux [kernel](https://en.wikipedia.org/wiki/Linux_kernel) on a VM or BareMetal server connected to Cloud Backup may affect the performance of the Cloud Backup agent: it will not be able to create a backup of the VM/server or recover the VM/server from a backup.

This may affect the agent’s performance, since the SnapAPI module (developed by the [backup provider](../../concepts/index.md#providers) for the agent to work with disks and built by the [DKMS framework](https://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support) for a specific Linux kernel) may not update after updating the kernel and may therefore cease to match the kernel version. 

To restore the Cloud Backup agent’s performance affected by a Linux kernel update, you need to update the version of the Linux kernel headers DKMS refers to when building the SnapAPI module. Once the kernel header version matches the kernel version, DKMS will rebuild the SnapAPI module for the required Linux kernel version at the next start of the VM or BareMetal server.

{% list tabs group=operating_system %}

- Debian/Ubuntu {#ubuntu}

  1. Make sure the Linux kernel version does not match that of the kernel headers:
  
      * To find out the Linux kernel version, run this command in the terminal:
  
          ```bash
          uname -r
          ```
  
          Result:
  
          ```text
          6.1.0-31-amd64
          ```
      * To find out the version of the Linux kernel headers, run this command:
  
          ```bash
          sudo apt list --installed | grep header
          ```
  
          Result:
  
          ```bash
          linux-headers-6.1.0-27-amd64/stable,now 6.1.115-1 amd64 [installed]
          linux-headers-6.1.0-27-common/stable,now 6.1.115-1 all [installed,automatic]
          ```
      As you can see from the command outputs, the versions are different: the Linux kernel version is `6.1.0-31`, and the Linux kernel header version is `6.1.0-27`.
  1. Install the `linux-headers` package for the new Linux kernel:
  
      ```bash
      sudo apt install linux-headers-$(uname -r)
      ```
  1. Make sure the new kernel headers have been added:
  
      ```bash
      sudo apt list --installed | grep header
      ```
  
      Result:
  
      ```bash
      linux-headers-6.1.0-27-amd64/stable,now 6.1.115-1 amd64 [installed]
      linux-headers-6.1.0-27-common/stable,now 6.1.115-1 all [installed,automatic]
      linux-headers-6.1.0-31-amd64/stable-security,now 6.1.128-1 amd64 [installed]
      linux-headers-6.1.0-31-common/stable-security,now 6.1.128-1 all [installed,automatic]
      ```
  1. Reboot your OS:
  
      ```bash
      sudo reboot
      ```
  
      During the reboot, the DKMS framework will rebuild the SnapAPI module for the required Linux kernel version and the Cloud Backup agent will start operating.

{% endlist %}

If you were unable to recover your Cloud Backup agent for any reason, [contact](https://center.yandex.cloud/support) support.