Documentation
¶
Overview ¶
Verify the repository integrity. Verify the integrity of the contents of a snapshot repository.
This API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail.
If you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its `read_only` option to `true`, and use this API to verify its integrity. Until you do so:
* It may not be possible to restore some snapshots from this repository. * Searchable snapshots may report errors when searched or may have unassigned shards. * Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored. * Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk. * Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents.
If the API finds any problems with the integrity of the contents of your repository, Elasticsearch will not be able to repair the damage. The only way to bring the repository back into a fully working state after its contents have been damaged is by restoring its contents from a repository backup which was taken before the damage occurred. You must also identify what caused the damage and take action to prevent it from happening again.
If you cannot restore a repository backup, register a new repository and use this for all future snapshot operations. In some cases it may be possible to recover some of the contents of a damaged repository, either by restoring as many of its snapshots as needed and taking new snapshots of the restored data, or by using the reindex API to copy data from any searchable snapshots mounted from the damaged repository.
Avoid all operations which write to the repository while the verify repository integrity API is running. If something changes the repository contents while an integrity verification is running then Elasticsearch may incorrectly report having detected some anomalies in its contents due to the concurrent writes. It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.
NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions.
NOTE: This API may not work correctly in a mixed-version cluster.
Index ¶
- Variables
- type NewRepositoryVerifyIntegrity
- type RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) BlobThreadPoolConcurrency(blobthreadpoolconcurrency int) *RepositoryVerifyIntegrity
- func (r RepositoryVerifyIntegrity) Do(providedCtx context.Context) (Response, error)
- func (r *RepositoryVerifyIntegrity) ErrorTrace(errortrace bool) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) FilterPath(filterpaths ...string) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) Header(key, value string) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *RepositoryVerifyIntegrity) Human(human bool) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) IndexSnapshotVerificationConcurrency(indexsnapshotverificationconcurrency int) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) IndexVerificationConcurrency(indexverificationconcurrency int) *RepositoryVerifyIntegrity
- func (r RepositoryVerifyIntegrity) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *RepositoryVerifyIntegrity) MaxBytesPerSec(maxbytespersec string) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) MaxFailedShardSnapshots(maxfailedshardsnapshots int) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) MetaThreadPoolConcurrency(metathreadpoolconcurrency int) *RepositoryVerifyIntegrity
- func (r RepositoryVerifyIntegrity) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *RepositoryVerifyIntegrity) Pretty(pretty bool) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) SnapshotVerificationConcurrency(snapshotverificationconcurrency int) *RepositoryVerifyIntegrity
- func (r *RepositoryVerifyIntegrity) VerifyBlobContents(verifyblobcontents bool) *RepositoryVerifyIntegrity
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type NewRepositoryVerifyIntegrity ¶
type NewRepositoryVerifyIntegrity func(repository string) *RepositoryVerifyIntegrity
NewRepositoryVerifyIntegrity type alias for index.
func NewRepositoryVerifyIntegrityFunc ¶
func NewRepositoryVerifyIntegrityFunc(tp elastictransport.Interface) NewRepositoryVerifyIntegrity
NewRepositoryVerifyIntegrityFunc returns a new instance of RepositoryVerifyIntegrity with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type RepositoryVerifyIntegrity ¶
type RepositoryVerifyIntegrity struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *RepositoryVerifyIntegrity
Verify the repository integrity. Verify the integrity of the contents of a snapshot repository.
This API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail.
If you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its `read_only` option to `true`, and use this API to verify its integrity. Until you do so:
* It may not be possible to restore some snapshots from this repository. * Searchable snapshots may report errors when searched or may have unassigned shards. * Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored. * Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk. * Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents.
If the API finds any problems with the integrity of the contents of your repository, Elasticsearch will not be able to repair the damage. The only way to bring the repository back into a fully working state after its contents have been damaged is by restoring its contents from a repository backup which was taken before the damage occurred. You must also identify what caused the damage and take action to prevent it from happening again.
If you cannot restore a repository backup, register a new repository and use this for all future snapshot operations. In some cases it may be possible to recover some of the contents of a damaged repository, either by restoring as many of its snapshots as needed and taking new snapshots of the restored data, or by using the reindex API to copy data from any searchable snapshots mounted from the damaged repository.
Avoid all operations which write to the repository while the verify repository integrity API is running. If something changes the repository contents while an integrity verification is running then Elasticsearch may incorrectly report having detected some anomalies in its contents due to the concurrent writes. It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting.
NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions.
NOTE: This API may not work correctly in a mixed-version cluster.
https://www.elastic.co/guide/en/elasticsearch/reference/current/verify-repo-integrity-api.html
func (*RepositoryVerifyIntegrity) BlobThreadPoolConcurrency ¶
func (r *RepositoryVerifyIntegrity) BlobThreadPoolConcurrency(blobthreadpoolconcurrency int) *RepositoryVerifyIntegrity
BlobThreadPoolConcurrency Number of threads to use for reading blob contents API name: blob_thread_pool_concurrency
func (RepositoryVerifyIntegrity) Do ¶
func (r RepositoryVerifyIntegrity) Do(providedCtx context.Context) (Response, error)
Do runs the request through the transport, handle the response and returns a repositoryverifyintegrity.Response
func (*RepositoryVerifyIntegrity) ErrorTrace ¶
func (r *RepositoryVerifyIntegrity) ErrorTrace(errortrace bool) *RepositoryVerifyIntegrity
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*RepositoryVerifyIntegrity) FilterPath ¶
func (r *RepositoryVerifyIntegrity) FilterPath(filterpaths ...string) *RepositoryVerifyIntegrity
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*RepositoryVerifyIntegrity) Header ¶
func (r *RepositoryVerifyIntegrity) Header(key, value string) *RepositoryVerifyIntegrity
Header set a key, value pair in the RepositoryVerifyIntegrity headers map.
func (*RepositoryVerifyIntegrity) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*RepositoryVerifyIntegrity) Human ¶
func (r *RepositoryVerifyIntegrity) Human(human bool) *RepositoryVerifyIntegrity
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (*RepositoryVerifyIntegrity) IndexSnapshotVerificationConcurrency ¶
func (r *RepositoryVerifyIntegrity) IndexSnapshotVerificationConcurrency(indexsnapshotverificationconcurrency int) *RepositoryVerifyIntegrity
IndexSnapshotVerificationConcurrency Number of snapshots to verify concurrently within each index API name: index_snapshot_verification_concurrency
func (*RepositoryVerifyIntegrity) IndexVerificationConcurrency ¶
func (r *RepositoryVerifyIntegrity) IndexVerificationConcurrency(indexverificationconcurrency int) *RepositoryVerifyIntegrity
IndexVerificationConcurrency Number of indices to verify concurrently API name: index_verification_concurrency
func (RepositoryVerifyIntegrity) IsSuccess ¶
func (r RepositoryVerifyIntegrity) IsSuccess(providedCtx context.Context) (bool, error)
IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.
func (*RepositoryVerifyIntegrity) MaxBytesPerSec ¶
func (r *RepositoryVerifyIntegrity) MaxBytesPerSec(maxbytespersec string) *RepositoryVerifyIntegrity
MaxBytesPerSec Rate limit for individual blob verification API name: max_bytes_per_sec
func (*RepositoryVerifyIntegrity) MaxFailedShardSnapshots ¶
func (r *RepositoryVerifyIntegrity) MaxFailedShardSnapshots(maxfailedshardsnapshots int) *RepositoryVerifyIntegrity
MaxFailedShardSnapshots Maximum permitted number of failed shard snapshots API name: max_failed_shard_snapshots
func (*RepositoryVerifyIntegrity) MetaThreadPoolConcurrency ¶
func (r *RepositoryVerifyIntegrity) MetaThreadPoolConcurrency(metathreadpoolconcurrency int) *RepositoryVerifyIntegrity
MetaThreadPoolConcurrency Number of threads to use for reading metadata API name: meta_thread_pool_concurrency
func (RepositoryVerifyIntegrity) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*RepositoryVerifyIntegrity) Pretty ¶
func (r *RepositoryVerifyIntegrity) Pretty(pretty bool) *RepositoryVerifyIntegrity
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*RepositoryVerifyIntegrity) SnapshotVerificationConcurrency ¶
func (r *RepositoryVerifyIntegrity) SnapshotVerificationConcurrency(snapshotverificationconcurrency int) *RepositoryVerifyIntegrity
SnapshotVerificationConcurrency Number of snapshots to verify concurrently API name: snapshot_verification_concurrency
func (*RepositoryVerifyIntegrity) VerifyBlobContents ¶
func (r *RepositoryVerifyIntegrity) VerifyBlobContents(verifyblobcontents bool) *RepositoryVerifyIntegrity
VerifyBlobContents Whether to verify the contents of individual blobs API name: verify_blob_contents