[Yandex Cloud documentation](../../index.md) > [Tutorials](../index.md) > [Storing and recovering data](index.md) > Backing up to Object Storage > Backing up to Object Storage with Duplicati

# Backing up to Yandex Object Storage with Duplicati

You can use Yandex Object Storage for data backup and recovery using [Duplicati](https://www.duplicati.com/).

To configure backing up to Object Storage with Duplicati:

1. [Get your cloud ready](#before-begin).
1. [Create a bucket](#create-bucket).
1. [Set up a service account](#configure-service-account).
1. [Install Duplicati](#install-duplicati).
1. [Set up Duplicati](#configure-duplicati).
1. [Test your backup](#test-backup).

If you no longer need the resources you created, [delete them](#clear-out).

## Getting started {#before-begin}

Sign up for Yandex Cloud and create a [billing account](../../billing/concepts/billing-account.md):
1. Navigate to the [management console](https://console.yandex.cloud) and log in to Yandex Cloud or create a new account.
1. On the **[Yandex Cloud Billing](https://center.yandex.cloud/billing/accounts)** page, make sure you have a billing account linked and it has the `ACTIVE` or `TRIAL_ACTIVE` [status](../../billing/concepts/billing-account-statuses.md). If you do not have a billing account, [create one](../../billing/quickstart/index.md) and [link](../../billing/operations/pin-cloud.md) a cloud to it.

If you have an active billing account, you can create or select a [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) for your infrastructure on the [cloud page](https://console.yandex.cloud/cloud).

[Learn more about clouds and folders here](../../resource-manager/concepts/resources-hierarchy.md).

### Required paid resources {#paid-resources}

The cost of Duplicati backup includes:

* Fee for data storage (see [Yandex Object Storage pricing](../../storage/pricing.md#prices-storage)).
* Fee for data operations (see [Yandex Object Storage pricing](../../storage/pricing.md#prices-operations)).
* Fee for outbound traffic from Yandex Cloud to the internet (see [Yandex Object Storage pricing](../../storage/pricing.md#prices-traffic)).

## Create a bucket {#create-bucket}

To create a bucket for backups:

{% list tabs group=instructions %}

- Management console {#console}
 
  1. Go to the Yandex Cloud [management console](https://console.yandex.cloud) and select the [folder](../../resource-manager/concepts/resources-hierarchy.md#folder) where you will perform the operations.
  1. On the folder page, click ![plus](../../_assets/console-icons/plus.svg) **Create resource** and select **Bucket**.
  1. In the ** Name** field, enter a name for the [bucket](../../storage/concepts/bucket.md) consistent with the [naming conventions](../../storage/concepts/bucket.md#naming).
  1. In the **Read objects**, **Read object list**, and **Read settings** fields, select `With authorization`.
  1. Specify the maximum size of the bucket in GB.
  1. Click **Create bucket**.

{% endlist %}

## Set up a service account {#configure-service-account}

In Object Storage, you back up data under a [service account](../../iam/concepts/users/service-accounts.md). If you do not have a service account, [create](../../iam/operations/sa/create.md) one.

To create a service account:

1. [Assign](../../iam/operations/sa/assign-role-for-sa.md) the `storage.editor` [role](../../iam/concepts/access-control/roles.md) to the service account.
1. [Create](../../iam/operations/authentication/manage-access-keys.md#create-access-key) a static access key. Save the ID and the secret key. After closing the window, the private key properties will no longer be available.

## Install Duplicati {#install-duplicati}

{% list tabs group=operating_system %}

- Windows {#windows}

  1. [Install](https://dotnet.microsoft.com/en-us/download) Microsoft .NET Framework, version 4.6.2 or higher.
  1. [Install](https://www.duplicati.com/download) Duplicati.

- Linux/macOS {#linux-macos}

  1. [Install](https://www.mono-project.com/download/stable/) Mono.
  1. [Install](https://www.duplicati.com/download) Duplicati.

{% endlist %}

## Configure Duplicati {#configure-duplicati}

To configure Duplicati to work with Object Storage:

1. Run Duplicati. If required, set a password for your account.
1. Click **Add backup**.
1. Select **Add a new backup** ![image](../../_assets/plus.svg).
1. At the **General** step, enter the backup plan name: `Yandex Cloud`. If you chose to encrypt the backup (`AES-256 encryption` or `GNU Privacy Guard`), enter the password and confirm it. Click **Continue**.
1. At the **Destination** step, select `S3 Compatible` and click **Choose**:
   1. In the **Bucket name** field, enter your bucket name.
   1. In the **Folder path** field, specify the path inside the bucket (prefix). If you need the bucket root, leave this field empty.
   1. In the **Server** field, enter this address: `storage.yandexcloud.net/`. If there is a bucket connection error, try specifying the address without the slash: `storage.yandexcloud.net`.
   1. In the **Access Key ID** field, specify the static access key ID.
   1. In the **Secret Access Key** field, paste the secret key. Click **Continue**.
1. To make sure the settings are correct, click **Test now** in the window that opens.
1. If successful, it will take you to the next step, **Source Data**. At this step:
   1. In the **Source Data** field, select the local files you want to back up.
   1. Optionally, configure filters in the **Filters** field.
   1. Optionally, under **Exclude**, configure backup exclusions.
   1. Click **Continue**.
1. At the **Schedule** step, choose a backup schedule from the list or set a custom one by selecting **Custom** and enabling **Automatically run backups**. To create backups manually, select **Don't run automatically**. Click **Continue**.
1. At the **Options** step, specify the volume size and set the storage duration. Click **Submit**.

## Test your backup {#test-backup}

To test your backup:

1. In the list of backup plans, next to the `Yandex Cloud` plan, click **Start**. Wait for the operation to complete.
1. In the Yandex Cloud [management console](https://console.yandex.cloud), select the folder with the backup bucket.
1. Select **Object Storage**.
1. Open the bucket with backups and check whether all relevant files were copied.

For more information about restoring data from a backup, see [this Duplicati article](https://duplicati.readthedocs.io/en/latest/03-using-the-graphical-user-interface/#restoring-files-from-a-backup).

## How to delete the resources you created {#clear-out}

To stop paying for the resources you created:

1. [Delete](../../storage/operations/objects/delete-all.md) the [objects](../../storage/concepts/object.md) from the [bucket](../../storage/concepts/bucket.md).
1. [Delete](../../storage/operations/buckets/delete.md) the bucket.