elasticsearch/docs/reference/snapshot-restore/repository-source-only.asciidoc
James Rodewig cb6265f9bd
[DOCS] Move snapshot repo types to separate pages (#82826)
With https://github.com/elastic/elasticsearch/pull/81870, the Azure, GCS, and S3 repository types have separate, dedicated pages in the Elasticsearch guide. For consistency, this PR creates separate pages for the shared file system, read-only URL, and source-only repository types.

Related changes:

- Adds redirects to the plugins docs
- Fixes a few breaking changes that refer to the Azure, GCS, and S3 repositories as plugins.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2022-01-26 17:13:39 -05:00

78 lines
2.8 KiB
Text

[[snapshots-source-only-repository]]
=== Source-only repository
You can use a source-only repository to take minimal, source-only snapshots that
use up to 50% less disk space than regular snapshots.
Unlike other repository types, a source-only repository doesn't directly store
snapshots. It delegates storage to another registered snapshot repository.
When you take a snapshot using a source-only repository, {es} creates a
source-only snapshot in the delegated storage repository. This snapshot only
contains stored fields and metadata. It doesn't include index or doc values
structures and isn't immediately searchable when restored. To search the
restored data, you first have to <<docs-reindex,reindex>> it into a new data
stream or index.
[IMPORTANT]
==================================================
Source-only snapshots are only supported if the `_source` field is enabled and no source-filtering is applied.
When you restore a source-only snapshot:
* The restored index is read-only and can only serve `match_all` search or scroll requests to enable reindexing.
* Queries other than `match_all` and `_get` requests are not supported.
* The mapping of the restored index is empty, but the original mapping is available from the types top
level `meta` element.
==================================================
Before registering a source-only repository, use {kib} or the
<<put-snapshot-repo-api,create snapshot repository API>> to register a snapshot
repository of another type to use for storage. Then register the source-only
repository and specify the delegated storage repository in the request.
[source,console]
----
PUT _snapshot/my_src_only_repository
{
"type": "source",
"settings": {
"delegate_type": "fs",
"location": "my_backup_repository"
}
}
----
// TEST[setup:setup-repository]
// TEST[s/my_backup_repository/my_repository/]
[[source-only-repository-settings]]
==== Repository settings
`chunk_size`::
(Optional, <<byte-units,byte value>>)
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).
`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`.
`delegate_type`::
(Optional, string)
Delegated repository type. For valid values, see the
<<put-snapshot-repo-api-request-type,`type` parameter>>.
+
`source` repositories can use `settings` properties for its delegated repository
type. See <<snapshots-source-only-repository>>.
`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`.
include::repository-shared-settings.asciidoc[]