﻿---
title: Source-only repository settings
description: You can use a source repository to take source-only snapshots that delegate storage to another registered repository type. This page lists settings that...
url: https://www.elastic.co/elastic/docs-builder/docs/3064/reference/elasticsearch/configuration-reference/source-repository-settings
products:
  - Elasticsearch
applies_to:
  - Elastic Stack: Generally available
---

# Source-only repository settings
You can use a `source` repository to take [source-only snapshots](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3064/deploy-manage/tools/snapshot-and-restore/source-only-repository) that delegate storage to another registered repository type. This page lists settings that apply to the `source` repository type when you create or update it via the [Create or update a snapshot repository](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository) API.

## Repository settings

The `source` repository type supports a list of settings. You supply them in the `settings` object when you register or update the repository.
For example, the following request registers `my_src_only_repository` with the following settings:
```json

{
  "type": "source", <1>
  "settings": {
    "delegate_type": "fs", <2>
    "location": "my_backup_repository" <3>
  }
}
```

The following settings are supported:
<definitions>
  <definition term="chunk_size">
    (Optional, [byte value](/elastic/docs-builder/docs/3064/reference/elasticsearch/rest-apis/api-conventions#byte-units)) Maximum size of files in snapshots. In snapshots, files larger than this are broken down into chunks of this size or smaller. Defaults to `null` (unlimited file size).
  </definition>
  <definition term="compress">
    (Optional, Boolean) If `true`, metadata files, such as index mappings and settings, are compressed in snapshots. Data files are not compressed. Defaults to `true`.
  </definition>
  <definition term="delegate_type">
    (Optional, string) Delegated repository type. For valid values, see the [`type` parameter](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository#put-snapshot-repo-api-request-type). This must be set when you create a `source` repository.
    `source` repositories can use `settings` properties for their delegated repository type.
  </definition>
  <definition term="max_number_of_snapshots">
    (Optional, integer) Maximum number of snapshots the repository can contain. Defaults to `Integer.MAX_VALUE`, which is `2`^`31`^`-1` or `2147483647`.
  </definition>
  <definition term="max_restore_bytes_per_sec">
    (Optional, [byte value](/elastic/docs-builder/docs/3064/reference/elasticsearch/rest-apis/api-conventions#byte-units)) Maximum snapshot restore rate per node. Defaults to unlimited. Note that restores are also throttled through [recovery settings](https://www.elastic.co/elastic/docs-builder/docs/3064/reference/elasticsearch/configuration-reference/index-recovery-settings).
  </definition>
  <definition term="max_snapshot_bytes_per_sec">
    (Optional, [byte value](/elastic/docs-builder/docs/3064/reference/elasticsearch/rest-apis/api-conventions#byte-units)) Maximum snapshot creation rate per node. Defaults to `40mb` per second. Note that if the [recovery settings for managed services](/elastic/docs-builder/docs/3064/reference/elasticsearch/configuration-reference/index-recovery-settings#recovery-settings-for-managed-services) are set, then it defaults to unlimited, and the rate is additionally throttled through [recovery settings](https://www.elastic.co/elastic/docs-builder/docs/3064/reference/elasticsearch/configuration-reference/index-recovery-settings).
  </definition>
  <definition term="readonly">
    (Optional, Boolean) If `true`, the repository is read-only. The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it.
    Only a cluster with write access can create snapshots in the repository. All other clusters connected to the repository should have the `readonly` parameter set to `true`.
    If `false`, the cluster can write to the repository and create snapshots in it. Defaults to `false`.
    <important>
      If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository.
    </important>
  </definition>
</definitions>