[Yandex Cloud documentation](../../index.md) > [Yandex Cloud Backup](../index.md) > Troubleshooting

# Troubleshooting in Cloud Backup

This section describes typical problems you may encounter while using Cloud Backup and gives troubleshooting recommendations.

* [Why cannot I add a VM or Yandex BareMetal server to Cloud Backup?](#cannot-add-vm)

* [How do I reconnect a VM or BareMetal server deleted from Cloud Backup?](#reconnect-deleted-vm)

* [How do I reconnect a VM or BareMetal server to Cloud Backup after recovering its backup to another VM or server?](#how-to-renew-connection)

* [Why are old backups not deleted after reconnecting a VM to Cloud Backup?](#old-backups-not-deleted)

* [Error when trying to recover a VM or BareMetal server from a backup](#recovery-error)

* [Error when connecting to a Windows VM](#windows-connection-issue)

* [Authorization error when installing a Cloud Backup agent on a Linux VM](#install-auth-error)

* [How do I update the Cloud Backup agent on a VM?](#update-backup-agent)

* [Why are backups disabled after the OS update?](#kernel-update-consequences)

* [Creating incremental backups takes longer than usual](#av-interaction)

* [Out-Of-Memory Killer (OOM Killer) kills the Cloud Backup agent process in Linux](#oom-solution)

* [How do I restore a VM or BareMetal server with LVM from a backup?](#restore-lvm)

* [If I delete a VM, will its backups remain?](#backup-after-delete-vm)

#### Why cannot I add a VM or Yandex BareMetal server to Cloud Backup? {#cannot-add-vm}

Make sure that:

{% list tabs group=backup_resource_type %}

- VM {#vm}

  * The VM is created from a [supported image](../concepts/vm-connection.md#os) or (if the Cloud Backup agent is installed manually) [Cloud Backup](../concepts/vm-connection.md#self-install) supports the VM's operating system.
  * The service account linked to the VM has the `backup.editor` [role](../security/index.md#backup-editor).
  * The [security group](../../vpc/concepts/security-groups.md) is [correctly](../concepts/vm-connection.md#vm-network-access) configured for the VM.

  For more information, see [Connecting Compute Cloud VM instances to Cloud Backup](../concepts/vm-connection.md).

- BareMetal server {#baremetal-server}

  * The server runs a [supported operating system](../concepts/vm-connection.md#self-install).
  * The service account whose IAM token is used to [install](../operations/backup-baremetal/backup-baremetal.md#agent-install) the Cloud Backup agent has the `backup.editor` [role](../security/index.md#backup-editor).
  * The server has a [public IP address assigned](../concepts/vm-connection.md#provide-access).

  For more information, see [Connecting a BareMetal server to Cloud Backup](../operations/backup-baremetal/backup-baremetal.md).

{% endlist %}


#### How do I reconnect a VM or BareMetal server deleted from Cloud Backup? {#reconnect-deleted-vm}

If you have [deleted a VM](../operations/delete-vm.md) or BareMetal server from Cloud Backup and want to reconnect it to the service, follow these guides:

{% list tabs group=backup_resource_type %}

- VM {#vm}

  * [Connecting a Linux VM](../operations/connect-vm-linux.md)
  * [Connecting a Windows VM](../operations/connect-vm-windows.md)

- BareMetal server {#baremetal-server}

  * Reinstall the Cloud Backup agent according to [this guide](../operations/backup-baremetal/backup-baremetal.md#agent-install).

{% endlist %}


#### How do I reconnect a VM or BareMetal server to Cloud Backup after restoring its backup to another VM or server? {#how-to-renew-connection}

{% list tabs group=backup_resource_type %}

- VM {#vm}

  A virtual machine becomes outdated after [its backup is restored to another VM](../operations/backup-vm/non-native-recovery.md). To avoid conflicts between the source and target VMs when performing a backup, [refresh](../operations/refresh-connection.md) the outdated VM's connection to Cloud Backup.

- BareMetal server {#baremetal-server}

  A BareMetal server becomes outdated after its backup is restored to another server. To avoid conflicts between the source and target BareMetal servers when performing a backup, [refresh](../operations/backup-baremetal/refresh-connection.md) the outdated server's connection to Cloud Backup.

{% endlist %}

#### Why are old backups not deleted after reconnecting a VM to Cloud Backup? {#old-backups-not-deleted}

When reconnecting, the VM is added to Cloud Backup as a new resource. Backups of the new VM are stored as per the linked [backup policy](../concepts/policy.md#retention).

The backup policy rules do not apply to the old VM's backups. Their storage is subject to the [pricing policy](../pricing.md#backups). If you do not need those backups, [delete](../operations/backup-vm/delete.md) them manually or use [bulk delete](../operations/backup-vm/batch-delete.md).


#### I get an error when trying to restore a VM or BareMetal server from a backup {#recovery-error}

Error message:

```text
Not all of the items are mapped. Please, check your goal instance and its volumes.
```

The error occurs because Cloud Backup cannot find a suitably sized disk on the target VM.

The boot disk of the target VM or BareMetal server must be at least the size of that of the source VM.

Check the target VM disks and [increase](../../compute/operations/disk-control/update.md#change-disk-size) their size if needed. You can also [use another VM](../operations/backup-vm/non-native-recovery.md) or BareMetal server with suitable parameters.

{% note info %}

To avoid errors when recovering from a backup, start by comparing the parameters of the disks and partitions of the backup against those of the [VM](../../compute/concepts/vm.md) or Yandex BareMetal [server](../../baremetal/concepts/servers.md). For more information, see [Viewing the parameters of backup disks and partitions](../operations/backup-vm/view-disk-layout.md).

{% endnote %}


#### Error when connecting to a Windows VM {#windows-connection-issue}

Error message:

```text
Fetching agent id from config
Iteration 0: The term 'acropsh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
```

Make sure that:

* [Cloud Backup supports](../concepts/vm-connection.md#os) the VM operating system.
* The service account linked to the VM has the `backup.editor` [role](../security/index.md#backup-editor).
* [Network access for your VM](../concepts/vm-connection.md#vm-network-access) is enabled.
* The PowerShell execution policies allow scripts. If not, allow scripts and restart PowerShell. For more information, see the [Microsoft documentation](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies).


#### Authorization error when installing a Cloud Backup agent on a Linux VM {#install-auth-error}

Error message:

```text
Failed to parse cloudbackup from instance attributes IAM token and instance registration id are empty, unable to provide authorization
```

The error occurs if the VM has no service account or if the account was configured incorrectly.

Make sure that:
* You have a service account [associated](../../compute/operations/vm-connect/auth-inside-vm.md#link-sa-with-instance) with the VM.
* Your service account has the `backup.editor` [role](../security/index.md#backup-editor).

#### How do I update the Cloud Backup agent on a VM? {#update-backup-agent}

Check [Updating the Cloud Backup agent on a VM](../operations/update-backup-agent.md).

#### Why are backups disabled after the OS update? {#kernel-update-consequences}

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.

To update Linux kernel header versions, follow these tutorials: [Restoring the Cloud Backup agent on a VM](../operations/update-backup-agent.md#restore-agent) and [Restoring the Cloud Backup agent on a BareMetal server](../operations/backup-baremetal/restore-agent.md).

#### Creating incremental backups of a VM or BareMetal server is taking longer than usual {#av-interaction}

Antivirus activity may affect the time required to create [incremental backups](../concepts/backup.md#types) under a policy with the fast backup [option](../concepts/policy.md#specification) enabled (`fastBackupEnabled`). For more information, see [Interaction with an antivirus](../concepts/av-interaction.md).

#### Out-Of-Memory Killer (OOM Killer) kills the Cloud Backup agent process in Linux {#oom-solution}

For faster data [backup](../operations/backup-vm/create.md) and [recovery](../operations/backup-vm/recover.md), the [Cloud Backup agent](../concepts/agent.md) can consume significant amounts of RAM of the backed up resource, i.e., [virtual machine](../../compute/concepts/vm.md) or [BareMetal server](../../baremetal/concepts/servers.md). The agent can even use up all the available RAM, which in some cases may disrupt the resource's other services and make it impossible to complete the backup or recovery process.

To prevent such issues, [limit](../operations/limit-agent-memory-usage.md) the amount of data the agent caches in RAM.

{% note info %}

Limiting the Cloud Backup agent's use of RAM may slow down the backup and recovery operations.

{% endnote %}

#### How do I restore a VM or BareMetal server with LVM from a backup? {#restore-lvm}

If you are using [LVM](https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)) to manage the disk space of the protected resource, learn [how to restore](../concepts/backup.md#lvm) resources with LVM in Cloud Backup.

#### Issues installing the Cloud Backup agent on a VM with low computing resources {#low-resources-installation}

Installing a Cloud Backup agent is a resource-intensive operation. If you want to use a VM in the minimum possible configuration or, for example, a VM with a [vCPU performance level](../../compute/concepts/performance-levels.md) below 100%, we recommend increasing the VM's resources during the Cloud Backup agent installation.

#### If I delete a VM, will its backups remain? {#backup-after-delete-vm}

Yes. Deleting a VM does not delete its backups. The latter are linked to the [backup policy](../concepts/policy.md), not the VM.