# Activating the service


To activate the service, you need _at least_ the `backup.user` [role](../security/index.md#backup-user) for the [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) in which you want to create backups of VMs or BareMetal servers.

When you enable the service, the backup provider starts. For more information about the backup provider and data sent to it, see [Service activation and backup provider](../concepts/index.md#providers).

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder where you want to create a VM or Yandex BareMetal server with a Cloud Backup connection.
  1. Navigate to **Cloud Backup**.
  1. Click **Activate**.

      If there is no **Activate** button, and you can create a VM connected to Cloud Backup, it means the service has already been activated.

  After activation, the system automatically creates the following backup policies:
  * `Default daily`: Daily incremental backup with the last 15 backups retained.
  * `Default weekly`: Weekly incremental backup with the last 15 backups retained.
  * `Default monthly`: Monthly incremental backup with the last 15 backups retained.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../cli/quickstart.md#install).
  
  The folder used by default is the one specified when [creating](../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
  
  1. View the description of the [CLI](../../cli/index.md) command to activate the service:
  
     ```bash
     yc backup provider activate --help
     ```
  
  1. Activate the service in the default folder:
  
     ```bash
     yc backup provider activate --async
     ```
  
     Where `--async` displays the operation progress info. This is an optional parameter.
  
  1. Once you execute the command, you will get the activation warning: `This command will activate backup provider for your folder. Do you confirm this action to be executed? [Yes/no][y/N]`. Confirm the activation by typing `yes` or `y` in the terminal.
  
     {% note tip %}
  
     Use the `--force` flag to activate the service without a confirmation.
  
     {% endnote %}
  
     Result:
  
     ```text
     id: cdgmnefxiatx********
     description: activate provider
     created_at: "2024-10-14T09:03:47.960564Z"
     created_by: ajec1gaqcmtr********
     modified_at: "2024-10-14T09:03:47.960564Z"
     done: true
     metadata:
       '@type': type.googleapis.com/yandex.cloud.backup.v1.ActivateProviderMetadata
       folder_id: b1go3el0d8fs********
     response:
       '@type': type.googleapis.com/google.protobuf.Empty
       value: {}
     ```
  
  After activation, the system automatically creates the following backup policies:
  * `Default daily`: Daily incremental backup with the last 15 backups retained.
  * `Default weekly`: Weekly incremental backup with the last 15 backups retained.
  * `Default monthly`: Monthly incremental backup with the last 15 backups retained.
  
  If you prefer not to create them, use the `--skip-default-policy` parameter.

- API {#api}

  Use the [Activate](../backup/api-ref/Provider/activate.md) REST API method for the [Provider](../backup/api-ref/Provider/index.md) resource or the [ProviderService/Activate](../backup/api-ref/grpc/Provider/activate.md) gRPC API call.

{% endlist %}